!(function (t, e) {
    if ('object' == typeof exports && 'undefined' != typeof module) {
        e(exports);
    } else {
        if ('function' == typeof define && define.amd) {
            define(['exports'], e);
        } else {
            e((t.echarts = {}));
        }
    }
})(this, function (t) {
    'use strict';
    function e(t) {
        var e = {};
        var n = {};
        var i = t.match(/Firefox\/([\d.]+)/);
        var r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/);
        var a = t.match(/Edge\/([\d.]+)/);
        var o = /micromessenger/i.test(t);
        if (i) {
            n.firefox = true;
            n.version = i[1];
        }
        if (r) {
            n.ie = true;
            n.version = r[1];
        }
        if (a) {
            n.edge = true;
            n.version = a[1];
        }
        if (o) {
            n.weChat = true;
        }
        return {
            browser: n,
            os: e,
            node: false,
            canvasSupported: !!document.createElement('canvas').getContext,
            svgSupported: 'undefined' != typeof SVGRect,
            touchEventsSupported: 'ontouchstart' in window && !n.ie && !n.edge,
            pointerEventsSupported: 'onpointerdown' in window && (n.edge || (n.ie && n.version >= 11))
        };
    }
    function n(t, e) {
        if ('createCanvas' === t) {
            Eu = null;
        }
        Pu[t] = e;
    }
    function i(t) {
        if (null == t || 'object' != typeof t) {
            return t;
        }
        var e = t;
        var n = Cu.call(t);
        if ('[object Array]' === n) {
            if (!R(t)) {
                e = [];
                for (r = 0, a = t.length, void 0; a > r; r++) {
                    var r;
                    var a;
                    e[r] = i(t[r]);
                }
            }
        } else if (Su[n]) {
            if (!R(t)) {
                var o = t.constructor;
                if (t.constructor.from) {
                    e = o.from(t);
                } else {
                    e = new o(t.length);
                    for (r = 0, a = t.length, void 0; a > r; r++) {
                        var r;
                        var a;
                        e[r] = i(t[r]);
                    }
                }
            }
        } else if (!Mu[n] && !R(t) && !C(t)) {
            e = {};
            for (var s in t) {
                if (t.hasOwnProperty(s)) {
                    e[s] = i(t[s]);
                }
            }
        }
        return e;
    }
    function r(t, e, n) {
        if (!b(e) || !b(t)) {
            return n ? i(e) : t;
        }
        for (var a in e) {
            if (e.hasOwnProperty(a)) {
                var o = t[a];
                var s = e[a];
                !b(s) || !b(o) || _(s) || _(o) || C(s) || C(o) || M(s) || M(o) || R(s) || R(o) ? (!n && a in t) || (t[a] = i(e[a], true)) : r(o, s, n);
            }
        }
        return t;
    }
    function a(t, e) {
        for (n = t[0], i = 1, a = t.length, void 0; a > i; i++) {
            var n;
            var i;
            var a;
            n = r(n, t[i], e);
        }
        return n;
    }
    function o(t, e) {
        for (var n in e) {
            if (e.hasOwnProperty(n)) {
                t[n] = e[n];
            }
        }
        return t;
    }
    function s(t, e, n) {
        for (var i in e) {
            if (e.hasOwnProperty(i) && (n ? null != e[i] : null == t[i])) {
                t[i] = e[i];
            }
        }
        return t;
    }
    function l() {
        Eu || (Eu = Ou().getContext('2d'));
        return Eu;
    }
    function h(t, e) {
        if (t) {
            if (t.indexOf) {
                return t.indexOf(e);
            }
            for (n = 0, i = t.length, void 0; i > n; n++) {
                var n;
                var i;
                if (t[n] === e) {
                    return n;
                }
            }
        }
        return -1;
    }
    function u(t, e) {
        function n() {}
        var i = t.prototype;
        n.prototype = e.prototype;
        t.prototype = new n();
        for (var r in i) {
            t.prototype[r] = i[r];
        }
        t.prototype.constructor = t;
        t.superClass = e;
    }
    function c(t, e, n) {
        t = 'prototype' in t ? t.prototype : t;
        e = 'prototype' in e ? e.prototype : e;
        s(t, e, n);
    }
    function f(t) {
        return t ? ('string' == typeof t ? false : 'number' == typeof t.length) : void 0;
    }
    function d(t, e, n) {
        if (t && e) {
            if (t.forEach && t.forEach === ku) t.forEach(e, n);
            else if (t.length === +t.length) {
                for (i = 0, r = t.length, void 0; r > i; i++) {
                    var i;
                    var r;
                    e.call(n, t[i], i, t);
                }
            } else {
                for (var a in t) {
                    if (t.hasOwnProperty(a)) {
                        e.call(n, t[a], a, t);
                    }
                }
            }
        }
    }
    function p(t, e, n) {
        if (t && e) {
            if (t.map && t.map === Au) {
                return t.map(e, n);
            }
            for (i = [], r = 0, a = t.length, void 0; a > r; r++) {
                var i;
                var r;
                var a;
                i.push(e.call(n, t[r], r, t));
            }
            return i;
        }
    }
    function g(t, e, n, i) {
        if (t && e) {
            if (t.reduce && t.reduce === Lu) {
                return t.reduce(e, n, i);
            }
            for (r = 0, a = t.length, void 0; a > r; r++) {
                var r;
                var a;
                n = e.call(i, n, t[r], r, t);
            }
            return n;
        }
    }
    function v(t, e, n) {
        if (t && e) {
            if (t.filter && t.filter === Du) {
                return t.filter(e, n);
            }
            for (i = [], r = 0, a = t.length, void 0; a > r; r++) {
                var i;
                var r;
                var a;
                if (e.call(n, t[r], r, t)) {
                    i.push(t[r]);
                }
            }
            return i;
        }
    }
    function m(t, e) {
        var n = Iu.call(arguments, 2);
        return function () {
            return t.apply(e, n.concat(Iu.call(arguments)));
        };
    }
    function y(t) {
        var e = Iu.call(arguments, 1);
        return function () {
            return t.apply(this, e.concat(Iu.call(arguments)));
        };
    }
    function _(t) {
        return '[object Array]' === Cu.call(t);
    }
    function x(t) {
        return 'function' == typeof t;
    }
    function w(t) {
        return '[object String]' === Cu.call(t);
    }
    function b(t) {
        var e = typeof t;
        return 'function' === e || (!!t && 'object' == e);
    }
    function M(t) {
        return !!Mu[Cu.call(t)];
    }
    function S(t) {
        return !!Su[Cu.call(t)];
    }
    function C(t) {
        return 'object' == typeof t && 'number' == typeof t.nodeType && 'object' == typeof t.ownerDocument;
    }
    function T(t) {
        return t !== t;
    }
    function k() {
        for (t = 0, e = arguments.length, void 0; e > t; t++) {
            var t;
            var e;
            if (null != arguments[t]) {
                return arguments[t];
            }
        }
    }
    function D(t, e) {
        return null != t ? t : e;
    }
    function I(t, e, n) {
        return null != t ? t : null != e ? e : n;
    }
    function A() {
        return Function.call.apply(Iu, arguments);
    }
    function L(t) {
        if ('number' == typeof t) {
            return [t, t, t, t];
        }
        var e = t.length;
        return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t;
    }
    function P(t, e) {
        if (!t) {
            throw new Error(e);
        }
    }
    function O(t) {
        return null == t ? null : 'function' == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
    }
    function E(t) {
        t[Ru] = true;
    }
    function R(t) {
        return t[Ru];
    }
    function B(t) {
        function e(t, e) {
            n ? that.set(t, e) : that.set(e, t);
        }
        var n = _(t);
        var that = this;
        t instanceof B ? t.each(e) : t && d(t, e);
    }
    function z(t) {
        return new B(t);
    }
    function N() {}
    function F(t, e) {
        var n = new Bu(2);
        if (null == t) {
            t = 0;
        }
        if (null == e) {
            e = 0;
        }
        n[0] = t;
        n[1] = e;
        return n;
    }
    function V(t, e) {
        t[0] = e[0];
        t[1] = e[1];
        return t;
    }
    function W(t) {
        var e = new Bu(2);
        e[0] = t[0];
        e[1] = t[1];
        return e;
    }
    function H(t, e, n) {
        t[0] = e[0] + n[0];
        t[1] = e[1] + n[1];
        return t;
    }
    function G(t, e, n, i) {
        t[0] = e[0] + n[0] * i;
        t[1] = e[1] + n[1] * i;
        return t;
    }
    function q(t, e, n) {
        t[0] = e[0] - n[0];
        t[1] = e[1] - n[1];
        return t;
    }
    function X(t) {
        return Math.sqrt(U(t));
    }
    function U(t) {
        return t[0] * t[0] + t[1] * t[1];
    }
    function Y(t, e, n) {
        t[0] = e[0] * n;
        t[1] = e[1] * n;
        return t;
    }
    function j(t, e) {
        var n = X(e);
        0 === n ? ((t[0] = 0), (t[1] = 0)) : ((t[0] = e[0] / n), (t[1] = e[1] / n));
        return t;
    }
    function Z(t, e) {
        return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
    }
    function $(t, e) {
        return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
    }
    function K(t, e, n) {
        var i = e[0];
        var r = e[1];
        t[0] = n[0] * i + n[2] * r + n[4];
        t[1] = n[1] * i + n[3] * r + n[5];
        return t;
    }
    function Q(t, e, n) {
        t[0] = Math.min(e[0], n[0]);
        t[1] = Math.min(e[1], n[1]);
        return t;
    }
    function J(t, e, n) {
        t[0] = Math.max(e[0], n[0]);
        t[1] = Math.max(e[1], n[1]);
        return t;
    }
    function te() {
        this.on('mousedown', this._dragStart, this);
        this.on('mousemove', this._drag, this);
        this.on('mouseup', this._dragEnd, this);
        this.on('globalout', this._dragEnd, this);
    }
    function ee(t, e) {
        return {
            target: t,
            topTarget: e && e.topTarget
        };
    }
    function ne(t, e, n) {
        return {
            type: t,
            event: n,
            target: e.target,
            topTarget: e.topTarget,
            cancelBubble: false,
            offsetX: n.zrX,
            offsetY: n.zrY,
            gestureEvent: n.gestureEvent,
            pinchX: n.pinchX,
            pinchY: n.pinchY,
            pinchScale: n.pinchScale,
            wheelDelta: n.zrDelta,
            zrByTouch: n.zrByTouch,
            which: n.which
        };
    }
    function ie() {}
    function re(t, e, n) {
        if (t[t.rectHover ? 'rectContain' : 'contain'](e, n)) {
            for (r = t, void 0; r; ) {
                var i;
                var r;
                if (r.clipPath && !r.clipPath.contain(e, n)) {
                    return false;
                }
                if (r.silent) {
                    i = true;
                }
                r = r.parent;
            }
            return i ? Wu : true;
        }
        return false;
    }
    function ae() {
        var t = new qu(6);
        oe(t);
        return t;
    }
    function oe(t) {
        t[0] = 1;
        t[1] = 0;
        t[2] = 0;
        t[3] = 1;
        t[4] = 0;
        t[5] = 0;
        return t;
    }
    function se(t, e) {
        t[0] = e[0];
        t[1] = e[1];
        t[2] = e[2];
        t[3] = e[3];
        t[4] = e[4];
        t[5] = e[5];
        return t;
    }
    function le(t, e, n) {
        var i = e[0] * n[0] + e[2] * n[1];
        var r = e[1] * n[0] + e[3] * n[1];
        var a = e[0] * n[2] + e[2] * n[3];
        var o = e[1] * n[2] + e[3] * n[3];
        var s = e[0] * n[4] + e[2] * n[5] + e[4];
        var l = e[1] * n[4] + e[3] * n[5] + e[5];
        t[0] = i;
        t[1] = r;
        t[2] = a;
        t[3] = o;
        t[4] = s;
        t[5] = l;
        return t;
    }
    function he(t, e, n) {
        t[0] = e[0];
        t[1] = e[1];
        t[2] = e[2];
        t[3] = e[3];
        t[4] = e[4] + n[0];
        t[5] = e[5] + n[1];
        return t;
    }
    function ue(t, e, n) {
        var i = e[0];
        var r = e[2];
        var a = e[4];
        var o = e[1];
        var s = e[3];
        var l = e[5];
        var h = Math.sin(n);
        var u = Math.cos(n);
        t[0] = i * u + o * h;
        t[1] = -i * h + o * u;
        t[2] = r * u + s * h;
        t[3] = -r * h + u * s;
        t[4] = u * a + h * l;
        t[5] = u * l - h * a;
        return t;
    }
    function ce(t, e, n) {
        var i = n[0];
        var r = n[1];
        t[0] = e[0] * i;
        t[1] = e[1] * r;
        t[2] = e[2] * i;
        t[3] = e[3] * r;
        t[4] = e[4] * i;
        t[5] = e[5] * r;
        return t;
    }
    function fe(t, e) {
        var n = e[0];
        var i = e[2];
        var r = e[4];
        var a = e[1];
        var o = e[3];
        var s = e[5];
        var l = n * o - a * i;
        return l ? ((l = 1 / l), (t[0] = o * l), (t[1] = -a * l), (t[2] = -i * l), (t[3] = n * l), (t[4] = (i * s - o * r) * l), (t[5] = (a * r - n * s) * l), t) : null;
    }
    function de(t) {
        return t > Uu || -Uu > t;
    }
    function pe(t) {
        this._target = t.target;
        this._life = t.life || 1000;
        this._delay = t.delay || 0;
        this._initialized = false;
        this.loop = null == t.loop ? false : t.loop;
        this.gap = t.gap || 0;
        this.easing = t.easing || 'Linear';
        this.onframe = t.onframe;
        this.ondestroy = t.ondestroy;
        this.onrestart = t.onrestart;
        this._pausedTime = 0;
        this._paused = false;
    }
    function ge(t) {
        t = Math.round(t);
        return 0 > t ? 0 : t > 255 ? 255 : t;
    }
    function ve(t) {
        return 0 > t ? 0 : t > 1 ? 1 : t;
    }
    function me(t) {
        return ge(t.length && '%' === t.charAt(t.length - 1) ? (parseFloat(t) / 100) * 255 : parseInt(t, 10));
    }
    function ye(t) {
        return ve(t.length && '%' === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t));
    }
    function _e(t, e, n) {
        0 > n ? (n += 1) : n > 1 && (n -= 1);
        return 1 > 6 * n ? t + (e - t) * n * 6 : 1 > 2 * n ? e : 2 > 3 * n ? t + (e - t) * (0.6666666666666666 - n) * 6 : t;
    }
    function xe(t, e, n, i, r) {
        t[0] = e;
        t[1] = n;
        t[2] = i;
        t[3] = r;
        return t;
    }
    function we(t, e) {
        t[0] = e[0];
        t[1] = e[1];
        t[2] = e[2];
        t[3] = e[3];
        return t;
    }
    function be(t, e) {
        if (rc) {
            we(rc, e);
        }
        rc = ic.put(t, rc || e.slice());
    }
    function Me(t, e) {
        if (t) {
            e = e || [];
            var n = ic.get(t);
            if (n) {
                return we(e, n);
            }
            t += '';
            var i = t.replace(/ /g, '').toLowerCase();
            if (i in nc) {
                we(e, nc[i]);
                be(t, e);
                return e;
            }
            if ('#' !== i.charAt(0)) {
                var r = i.indexOf('(');
                var a = i.indexOf(')');
                if (-1 !== r && a + 1 === i.length) {
                    var o = i.substr(0, r);
                    var s = i.substr(r + 1, a - (r + 1)).split(',');
                    var l = 1;
                    switch (o) {
                        case 'rgba':
                            if (4 !== s.length) {
                                return void xe(e, 0, 0, 0, 1);
                            }
                            l = ye(s.pop());
                        case 'rgb':
                            return 3 !== s.length ? void xe(e, 0, 0, 0, 1) : (xe(e, me(s[0]), me(s[1]), me(s[2]), l), be(t, e), e);
                        case 'hsla':
                            return 4 !== s.length ? void xe(e, 0, 0, 0, 1) : ((s[3] = ye(s[3])), Se(s, e), be(t, e), e);
                        case 'hsl':
                            return 3 !== s.length ? void xe(e, 0, 0, 0, 1) : (Se(s, e), be(t, e), e);
                        default:
                            return;
                    }
                }
                xe(e, 0, 0, 0, 1);
            } else {
                if (4 === i.length) {
                    var h = parseInt(i.substr(1), 16);
                    return h >= 0 && 4095 >= h
                        ? (xe(e, ((3840 & h) >> 4) | ((3840 & h) >> 8), (240 & h) | ((240 & h) >> 4), (15 & h) | ((15 & h) << 4), 1), be(t, e), e)
                        : void xe(e, 0, 0, 0, 1);
                }
                if (7 === i.length) {
                    var h = parseInt(i.substr(1), 16);
                    return h >= 0 && 16777215 >= h ? (xe(e, (16711680 & h) >> 16, (65280 & h) >> 8, 255 & h, 1), be(t, e), e) : void xe(e, 0, 0, 0, 1);
                }
            }
        }
    }
    function Se(t, e) {
        var n = (((parseFloat(t[0]) % 360) + 360) % 360) / 360;
        var i = ye(t[1]);
        var r = ye(t[2]);
        if (0.5 >= r) {
            var a = r * (i + 1);
        } else {
            var a = r + i - r * i;
        }
        var o = 2 * r - a;
        e = e || [];
        xe(e, ge(255 * _e(o, a, n + 0.3333333333333333)), ge(255 * _e(o, a, n)), ge(255 * _e(o, a, n - 0.3333333333333333)), 1);
        if (4 === t.length) {
            e[3] = t[3];
        }
        return e;
    }
    function Ce(t, e) {
        var n = Me(t);
        if (n) {
            for (var i = 0; 3 > i; i++) {
                n[i] = 0 > e ? (n[i] * (1 - e)) | 0 : ((255 - n[i]) * e + n[i]) | 0;
                n[i] > 255 ? (n[i] = 255) : t[i] < 0 && (n[i] = 0);
            }
            return Te(n, 4 === n.length ? 'rgba' : 'rgb');
        }
    }
    function Te(t, e) {
        if (t && t.length) {
            var n = t[0] + ',' + t[1] + ',' + t[2];
            if ('rgba' === e || 'hsva' === e || 'hsla' === e) {
                n += ',' + t[3];
            }
            return e + '(' + n + ')';
        }
    }
    function ke(t, e) {
        return t[e];
    }
    function De(t, e, n) {
        t[e] = n;
    }
    function Ie(t, e, n) {
        return (e - t) * n + t;
    }
    function Ae(t, e, n) {
        return n > 0.5 ? e : t;
    }
    function Le(t, e, n, i, r) {
        var a = t.length;
        if (1 == r) {
            for (var o = 0; a > o; o++) {
                i[o] = Ie(t[o], e[o], n);
            }
        } else {
            for (s = a && t[0].length, o = 0, void 0; a > o; o++) {
                var s;
                var o;
                for (var l = 0; s > l; l++) {
                    i[o][l] = Ie(t[o][l], e[o][l], n);
                }
            }
        }
    }
    function Pe(t, e, n) {
        var i = t.length;
        var r = e.length;
        if (i !== r) {
            var a = i > r;
            if (a) {
                t.length = r;
            } else {
                for (var o = i; r > o; o++) {
                    t.push(1 === n ? e[o] : ac.call(e[o]));
                }
            }
        }
        for (s = t[0] && t[0].length, o = 0, void 0; o < t.length; o++) {
            var s;
            var o;
            if (1 === n) {
                if (isNaN(t[o])) {
                    t[o] = e[o];
                }
            } else {
                for (var l = 0; s > l; l++) {
                    if (isNaN(t[o][l])) {
                        t[o][l] = e[o][l];
                    }
                }
            }
        }
    }
    function Oe(t, e, n) {
        if (t === e) {
            return true;
        }
        var i = t.length;
        if (i !== e.length) {
            return false;
        }
        if (1 === n) {
            for (var r = 0; i > r; r++) {
                if (t[r] !== e[r]) {
                    return false;
                }
            }
        } else {
            for (a = t[0].length, r = 0, void 0; i > r; r++) {
                var a;
                var r;
                for (var o = 0; a > o; o++) {
                    if (t[r][o] !== e[r][o]) {
                        return false;
                    }
                }
            }
        }
        return true;
    }
    function Ee(t, e, n, i, r, a, o, s, l) {
        var h = t.length;
        if (1 == l) {
            for (var u = 0; h > u; u++) {
                s[u] = Re(t[u], e[u], n[u], i[u], r, a, o);
            }
        } else {
            for (c = t[0].length, u = 0, void 0; h > u; u++) {
                var c;
                var u;
                for (var f = 0; c > f; f++) {
                    s[u][f] = Re(t[u][f], e[u][f], n[u][f], i[u][f], r, a, o);
                }
            }
        }
    }
    function Re(t, e, n, i, r, a, o) {
        var s = 0.5 * (n - t);
        var l = 0.5 * (i - e);
        return (2 * (e - n) + s + l) * o + (-3 * (e - n) - 2 * s - l) * a + s * r + e;
    }
    function Be(t) {
        if (f(t)) {
            var e = t.length;
            if (f(t[0])) {
                for (n = [], i = 0, void 0; e > i; i++) {
                    var n;
                    var i;
                    n.push(ac.call(t[i]));
                }
                return n;
            }
            return ac.call(t);
        }
        return t;
    }
    function ze(t) {
        t[0] = Math.floor(t[0]);
        t[1] = Math.floor(t[1]);
        t[2] = Math.floor(t[2]);
        return 'rgba(' + t.join(',') + ')';
    }
    function Ne(t) {
        var e = t[t.length - 1].value;
        return f(e && e[0]) ? 2 : 1;
    }
    function Fe(t, e, n, i, r, a) {
        var o = t._getter;
        var s = t._setter;
        var l = 'spline' === e;
        var h = i.length;
        if (h) {
            var u;
            var c = i[0].value;
            var d = f(c);
            var p = false;
            var g = false;
            if (d) {
                var v = Ne(i);
            } else {
                var v = 0;
            }
            i.sort(function (t, e) {
                return t.time - e.time;
            });
            u = i[h - 1].time;
            for (m = [], y = [], _ = i[0].value, x = true, w = 0, void 0; h > w; w++) {
                var m;
                var y;
                var _;
                var x;
                var w;
                m.push(i[w].time / u);
                var b = i[w].value;
                (d && Oe(b, _, v)) || (!d && b === _) || (x = false);
                _ = b;
                if ('string' == typeof b) {
                    var M = Me(b);
                    M ? ((b = M), (p = true)) : (g = true);
                }
                y.push(b);
            }
            if (a || !x) {
                for (S = y[h - 1], w = 0, void 0; h - 1 > w; w++) {
                    var S;
                    var w;
                    d ? Pe(y[w], S, v) : !isNaN(y[w]) || isNaN(S) || g || p || (y[w] = S);
                }
                if (d) {
                    Pe(o(t._target, r), S, v);
                }
                var C;
                var T;
                var k;
                var D;
                var I;
                var A;
                var L = 0;
                var P = 0;
                if (p) {
                    var O = [0, 0, 0, 0];
                }
                var E = function (t, e) {
                    var n;
                    if (0 > e) n = 0;
                    else if (P > e) {
                        for (C = Math.min(L + 1, h - 1), n = C; n >= 0 && !(m[n] <= e); n--) {}
                        n = Math.min(n, h - 2);
                    } else {
                        for (n = L; h > n && !(m[n] > e); n++) {}
                        n = Math.min(n - 1, h - 2);
                    }
                    L = n;
                    P = e;
                    var i = m[n + 1] - m[n];
                    if (0 !== i) {
                        T = (e - m[n]) / i;
                        if (l) {
                            A = y[n > h - 3 ? h - 1 : n + 2];
                            {
                                I = y[n > h - 2 ? h - 1 : n + 1];
                                {
                                    k = y[0 === n ? n : n - 1];
                                    {
                                        D = y[n];
                                        if (d) {
                                            Ee(k, D, I, A, T, T * T, T * T * T, o(t, r), v);
                                        } else {
                                            var a;
                                            if (p) {
                                                a = Ee(k, D, I, A, T, T * T, T * T * T, O, 1);
                                                a = ze(O);
                                            } else {
                                                if (g) {
                                                    return Ae(D, I, T);
                                                }
                                                a = Re(k, D, I, A, T, T * T, T * T * T);
                                            }
                                            s(t, r, a);
                                        }
                                    }
                                }
                            }
                        } else if (d) {
                            Le(y[n], y[n + 1], T, o(t, r), v);
                        } else {
                            var a;
                            if (p) {
                                Le(y[n], y[n + 1], T, O, 1);
                                a = ze(O);
                            } else {
                                if (g) {
                                    return Ae(y[n], y[n + 1], T);
                                }
                                a = Ie(y[n], y[n + 1], T);
                            }
                            s(t, r, a);
                        }
                    }
                };
                var R = new pe({
                    target: t._target,
                    life: u,
                    loop: t._loop,
                    delay: t._delay,
                    onframe: E,
                    ondestroy: n
                });
                if (e && 'spline' !== e) {
                    R.easing = e;
                }
                return R;
            }
        }
    }
    function Ve(t, e, n, i) {
        if (0 > n) {
            t += n;
            n = -n;
        }
        if (0 > i) {
            e += i;
            i = -i;
        }
        this.x = t;
        this.y = e;
        this.width = n;
        this.height = i;
    }
    function We(t) {
        for (var e = 0; t >= yc; ) {
            e |= 1 & t;
            t >>= 1;
        }
        return t + e;
    }
    function He(t, e, n, i) {
        var r = e + 1;
        if (r === n) {
            return 1;
        }
        if (i(t[r++], t[e]) < 0) {
            for (; n > r && i(t[r], t[r - 1]) < 0; ) {
                r++;
            }
            Ge(t, e, r);
        } else {
            for (; n > r && i(t[r], t[r - 1]) >= 0; ) {
                r++;
            }
        }
        return r - e;
    }
    function Ge(t, e, n) {
        for (n--; n > e; ) {
            var i = t[e];
            t[e++] = t[n];
            t[n--] = i;
        }
    }
    function qe(t, e, n, i, r) {
        for (i === e && i++; n > i; i++) {
            for (o = t[i], s = e, l = i, void 0; l > s; ) {
                var a;
                var o;
                var s;
                var l;
                a = (s + l) >>> 1;
                r(o, t[a]) < 0 ? (l = a) : (s = a + 1);
            }
            var h = i - s;
            switch (h) {
                case 3:
                    t[s + 3] = t[s + 2];
                case 2:
                    t[s + 2] = t[s + 1];
                case 1:
                    t[s + 1] = t[s];
                    break;
                default:
                    for (; h > 0; ) {
                        t[s + h] = t[s + h - 1];
                        h--;
                    }
            }
            t[s] = o;
        }
    }
    function Xe(t, e, n, i, r, a) {
        var o = 0;
        var s = 0;
        var l = 1;
        if (a(t, e[n + r]) > 0) {
            for (s = i - r; s > l && a(t, e[n + r + l]) > 0; ) {
                o = l;
                l = (l << 1) + 1;
                if (0 >= l) {
                    l = s;
                }
            }
            if (l > s) {
                l = s;
            }
            o += r;
            l += r;
        } else {
            for (s = r + 1; s > l && a(t, e[n + r - l]) <= 0; ) {
                o = l;
                l = (l << 1) + 1;
                if (0 >= l) {
                    l = s;
                }
            }
            if (l > s) {
                l = s;
            }
            var h = o;
            o = r - l;
            l = r - h;
        }
        for (o++; l > o; ) {
            var u = o + ((l - o) >>> 1);
            a(t, e[n + u]) > 0 ? (o = u + 1) : (l = u);
        }
        return l;
    }
    function Ue(t, e, n, i, r, a) {
        var o = 0;
        var s = 0;
        var l = 1;
        if (a(t, e[n + r]) < 0) {
            for (s = r + 1; s > l && a(t, e[n + r - l]) < 0; ) {
                o = l;
                l = (l << 1) + 1;
                if (0 >= l) {
                    l = s;
                }
            }
            if (l > s) {
                l = s;
            }
            var h = o;
            o = r - l;
            l = r - h;
        } else {
            for (s = i - r; s > l && a(t, e[n + r + l]) >= 0; ) {
                o = l;
                l = (l << 1) + 1;
                if (0 >= l) {
                    l = s;
                }
            }
            if (l > s) {
                l = s;
            }
            o += r;
            l += r;
        }
        for (o++; l > o; ) {
            var u = o + ((l - o) >>> 1);
            a(t, e[n + u]) < 0 ? (l = u) : (o = u + 1);
        }
        return l;
    }
    function Ye(t, e) {
        function n(t, e) {
            l[c] = t;
            h[c] = e;
            c += 1;
        }
        function i() {
            for (; c > 1; ) {
                var t = c - 2;
                if ((t >= 1 && h[t - 1] <= h[t] + h[t + 1]) || (t >= 2 && h[t - 2] <= h[t] + h[t - 1])) {
                    if (h[t - 1] < h[t + 1]) {
                        t--;
                    }
                } else if (h[t] > h[t + 1]) {
                    break;
                }
                a(t);
            }
        }
        function r() {
            for (; c > 1; ) {
                var t = c - 2;
                if (t > 0 && h[t - 1] < h[t + 1]) {
                    t--;
                }
                a(t);
            }
        }
        function a(n) {
            var i = l[n];
            var r = h[n];
            var a = l[n + 1];
            var u = h[n + 1];
            h[n] = r + u;
            if (n === c - 3) {
                l[n + 1] = l[n + 2];
                h[n + 1] = h[n + 2];
            }
            c--;
            var f = Ue(t[a], t, i, r, 0, e);
            i += f;
            r -= f;
            if (0 !== r) {
                u = Xe(t[i + r - 1], t, a, u, u - 1, e);
                if (0 !== u) {
                    u >= r ? o(i, r, a, u) : s(i, r, a, u);
                }
            }
        }
        function o(n, i, r, a) {
            var o = 0;
            for (o = 0; i > o; o++) {
                f[o] = t[n + o];
            }
            var s = 0;
            var l = r;
            var h = n;
            t[h++] = t[l++];
            if (0 !== --a) {
                if (1 === i) {
                    for (o = 0; a > o; o++) {
                        t[h + o] = t[l + o];
                    }
                    return void (t[h + a] = f[s]);
                }
                for (g = u, void 0; ; ) {
                    var c;
                    var d;
                    var p;
                    var g;
                    c = 0;
                    d = 0;
                    p = false;
                    do
                        if (e(t[l], f[s]) < 0) {
                            t[h++] = t[l++];
                            d++;
                            c = 0;
                            if (0 === --a) {
                                p = true;
                                break;
                            }
                        } else {
                            d = 0;
                            {
                                c++;
                                {
                                    t[h++] = f[s++];
                                    if (1 === --i) {
                                        p = true;
                                        break;
                                    }
                                }
                            }
                        }
                    while (g > (c | d));
                    if (p) {
                        break;
                    }
                    do {
                        c = Ue(t[l], f, s, i, 0, e);
                        if (0 !== c) {
                            for (o = 0; c > o; o++) {
                                t[h + o] = f[s + o];
                            }
                            h += c;
                            s += c;
                            i -= c;
                            if (1 >= i) {
                                p = true;
                                break;
                            }
                        }
                        t[h++] = t[l++];
                        if (0 === --a) {
                            p = true;
                            break;
                        }
                        d = Xe(f[s], t, l, a, 0, e);
                        if (0 !== d) {
                            for (o = 0; d > o; o++) {
                                t[h + o] = t[l + o];
                            }
                            h += d;
                            l += d;
                            a -= d;
                            if (0 === a) {
                                p = true;
                                break;
                            }
                        }
                        t[h++] = f[s++];
                        if (1 === --i) {
                            p = true;
                            break;
                        }
                        g--;
                    } while (c >= _c || d >= _c);
                    if (p) {
                        break;
                    }
                    if (0 > g) {
                        g = 0;
                    }
                    g += 2;
                }
                u = g;
                if (1 > u) {
                    u = 1;
                }
                if (1 === i) {
                    for (o = 0; a > o; o++) {
                        t[h + o] = t[l + o];
                    }
                    t[h + a] = f[s];
                } else {
                    if (0 === i) {
                        throw new Error();
                    }
                    for (o = 0; i > o; o++) {
                        t[h + o] = f[s + o];
                    }
                }
            } else {
                for (o = 0; i > o; o++) {
                    t[h + o] = f[s + o];
                }
            }
        }
        function s(n, i, r, a) {
            var o = 0;
            for (o = 0; a > o; o++) {
                f[o] = t[r + o];
            }
            var s = n + i - 1;
            var l = a - 1;
            var h = r + a - 1;
            var c = 0;
            var d = 0;
            t[h--] = t[s--];
            if (0 !== --i) {
                if (1 === a) {
                    for (h -= i, s -= i, d = h + 1, c = s + 1, o = i - 1; o >= 0; o--) {
                        t[d + o] = t[c + o];
                    }
                    return void (t[h] = f[l]);
                }
                for (var p = u; ; ) {
                    var g = 0;
                    var v = 0;
                    var m = false;
                    do
                        if (e(f[l], t[s]) < 0) {
                            t[h--] = t[s--];
                            g++;
                            v = 0;
                            if (0 === --i) {
                                m = true;
                                break;
                            }
                        } else {
                            g = 0;
                            {
                                v++;
                                {
                                    t[h--] = f[l--];
                                    if (1 === --a) {
                                        m = true;
                                        break;
                                    }
                                }
                            }
                        }
                    while (p > (g | v));
                    if (m) {
                        break;
                    }
                    do {
                        g = i - Ue(f[l], t, n, i, i - 1, e);
                        if (0 !== g) {
                            for (h -= g, s -= g, i -= g, d = h + 1, c = s + 1, o = g - 1; o >= 0; o--) {
                                t[d + o] = t[c + o];
                            }
                            if (0 === i) {
                                m = true;
                                break;
                            }
                        }
                        t[h--] = f[l--];
                        if (1 === --a) {
                            m = true;
                            break;
                        }
                        v = a - Xe(t[s], f, 0, a, a - 1, e);
                        if (0 !== v) {
                            for (h -= v, l -= v, a -= v, d = h + 1, c = l + 1, o = 0; v > o; o++) {
                                t[d + o] = f[c + o];
                            }
                            if (1 >= a) {
                                m = true;
                                break;
                            }
                        }
                        t[h--] = t[s--];
                        if (0 === --i) {
                            m = true;
                            break;
                        }
                        p--;
                    } while (g >= _c || v >= _c);
                    if (m) {
                        break;
                    }
                    if (0 > p) {
                        p = 0;
                    }
                    p += 2;
                }
                u = p;
                if (1 > u) {
                    u = 1;
                }
                if (1 === a) {
                    for (h -= i, s -= i, d = h + 1, c = s + 1, o = i - 1; o >= 0; o--) {
                        t[d + o] = t[c + o];
                    }
                    t[h] = f[l];
                } else {
                    if (0 === a) {
                        throw new Error();
                    }
                    for (c = h - (a - 1), o = 0; a > o; o++) {
                        t[c + o] = f[o];
                    }
                }
            } else {
                for (c = h - (a - 1), o = 0; a > o; o++) {
                    t[c + o] = f[o];
                }
            }
        }
        var l;
        var h;
        var u = _c;
        var c = 0;
        var f = [];
        l = [];
        h = [];
        this.mergeRuns = i;
        this.forceMergeRuns = r;
        this.pushRun = n;
    }
    function je(t, e, n, i) {
        n || (n = 0);
        i || (i = t.length);
        var r = i - n;
        if (!(2 > r)) {
            var a = 0;
            if (yc > r) {
                a = He(t, n, i, e);
                return void qe(t, n, i, n + a, e);
            }
            var o = new Ye(t, e);
            var s = We(r);
            do {
                a = He(t, n, i, e);
                if (s > a) {
                    var l = r;
                    if (l > s) {
                        l = s;
                    }
                    qe(t, n, n + l, n + a, e);
                    a = l;
                }
                o.pushRun(n, a);
                o.mergeRuns();
                r -= a;
                n += a;
            } while (0 !== r);
            o.forceMergeRuns();
        }
    }
    function Ze(t, e) {
        return t.zlevel === e.zlevel ? (t.z === e.z ? t.z2 - e.z2 : t.z - e.z) : t.zlevel - e.zlevel;
    }
    function $e(t, e, n) {
        var i = null == e.x ? 0 : e.x;
        var r = null == e.x2 ? 1 : e.x2;
        var a = null == e.y ? 0 : e.y;
        var o = null == e.y2 ? 0 : e.y2;
        e.global || ((i = i * n.width + n.x), (r = r * n.width + n.x), (a = a * n.height + n.y), (o = o * n.height + n.y));
        i = isNaN(i) ? 0 : i;
        r = isNaN(r) ? 1 : r;
        a = isNaN(a) ? 0 : a;
        o = isNaN(o) ? 0 : o;
        var s = t.createLinearGradient(i, a, r, o);
        return s;
    }
    function Ke(t, e, n) {
        var i = n.width;
        var r = n.height;
        var a = Math.min(i, r);
        var o = null == e.x ? 0.5 : e.x;
        var s = null == e.y ? 0.5 : e.y;
        var l = null == e.r ? 0.5 : e.r;
        e.global || ((o = o * i + n.x), (s = s * r + n.y), (l *= a));
        var h = t.createRadialGradient(o, s, 0, o, s, l);
        return h;
    }
    function Qe() {
        return false;
    }
    function Je(t, e, n) {
        var i = Ou();
        var r = e.getWidth();
        var a = e.getHeight();
        var o = i.style;
        if (o) {
            o.position = 'absolute';
            o.left = 0;
            o.top = 0;
            o.width = r + 'px';
            o.height = a + 'px';
            i.setAttribute('data-zr-dom-id', t);
        }
        i.width = r * n;
        i.height = a * n;
        return i;
    }
    function tn(t) {
        if ('string' == typeof t) {
            var e = Lc.get(t);
            return e && e.image;
        }
        return t;
    }
    function en(t, e, n, i, r) {
        if (t) {
            if ('string' == typeof t) {
                if ((e && e.__zrImageSrc === t) || !n) {
                    return e;
                }
                var a = Lc.get(t);
                var o = {
                    hostEl: n,
                    cb: i,
                    cbPayload: r
                };
                a
                    ? ((e = a.image), !rn(e) && a.pending.push(o))
                    : (!e && (e = new Image()),
                      (e.onload = nn),
                      Lc.put(
                          t,
                          (e.__cachedImgObj = {
                              image: e,
                              pending: [o]
                          })
                      ),
                      (e.src = e.__zrImageSrc = t));
                return e;
            }
            return t;
        }
        return e;
    }
    function nn() {
        var t = this.__cachedImgObj;
        this.onload = this.__cachedImgObj = null;
        for (var e = 0; e < t.pending.length; e++) {
            var n = t.pending[e];
            var i = n.cb;
            if (i) {
                i(this, n.cbPayload);
            }
            n.hostEl.dirty();
        }
        t.pending.length = 0;
    }
    function rn(t) {
        return t && t.width && t.height;
    }
    function an(t, e) {
        e = e || Bc;
        var n = t + ':' + e;
        if (Pc[n]) {
            return Pc[n];
        }
        for (i = (t + '').split('\n'), r = 0, a = 0, o = i.length, void 0; o > a; a++) {
            var i;
            var r;
            var a;
            var o;
            r = Math.max(mn(i[a], e).width, r);
        }
        if (Oc > Ec) {
            Oc = 0;
            Pc = {};
        }
        Oc++;
        Pc[n] = r;
        return r;
    }
    function on(t, e, n, i, r, a, o) {
        return a ? ln(t, e, n, i, r, a, o) : sn(t, e, n, i, r, o);
    }
    function sn(t, e, n, i, r, a) {
        var o = yn(t, e, r, a);
        var s = an(t, e);
        if (r) {
            s += r[1] + r[3];
        }
        var l = o.outerHeight;
        var h = hn(0, s, n);
        var u = un(0, l, i);
        var c = new Ve(h, u, s, l);
        c.lineHeight = o.lineHeight;
        return c;
    }
    function ln(t, e, n, i, r, a, o) {
        var s = _n(t, {
            rich: a,
            truncate: o,
            font: e,
            textAlign: n,
            textPadding: r
        });
        var l = s.outerWidth;
        var h = s.outerHeight;
        var u = hn(0, l, n);
        var c = un(0, h, i);
        return new Ve(u, c, l, h);
    }
    function hn(t, e, n) {
        'right' === n ? (t -= e) : 'center' === n && (t -= e / 2);
        return t;
    }
    function un(t, e, n) {
        'middle' === n ? (t -= e / 2) : 'bottom' === n && (t -= e);
        return t;
    }
    function cn(t, e, n) {
        var i = e.x;
        var r = e.y;
        var a = e.height;
        var o = e.width;
        var s = a / 2;
        var l = 'left';
        var h = 'top';
        switch (t) {
            case 'left':
                i -= n;
                r += s;
                l = 'right';
                h = 'middle';
                break;
            case 'right':
                i += n + o;
                r += s;
                h = 'middle';
                break;
            case 'top':
                i += o / 2;
                r -= n;
                l = 'center';
                h = 'bottom';
                break;
            case 'bottom':
                i += o / 2;
                r += a + n;
                l = 'center';
                break;
            case 'inside':
                i += o / 2;
                r += s;
                l = 'center';
                h = 'middle';
                break;
            case 'insideLeft':
                i += n;
                r += s;
                h = 'middle';
                break;
            case 'insideRight':
                i += o - n;
                r += s;
                l = 'right';
                h = 'middle';
                break;
            case 'insideTop':
                i += o / 2;
                r += n;
                l = 'center';
                break;
            case 'insideBottom':
                i += o / 2;
                r += a - n;
                l = 'center';
                h = 'bottom';
                break;
            case 'insideTopLeft':
                i += n;
                r += n;
                break;
            case 'insideTopRight':
                i += o - n;
                r += n;
                l = 'right';
                break;
            case 'insideBottomLeft':
                i += n;
                r += a - n;
                h = 'bottom';
                break;
            case 'insideBottomRight':
                i += o - n;
                r += a - n;
                l = 'right';
                h = 'bottom';
        }
        return {
            x: i,
            y: r,
            textAlign: l,
            textVerticalAlign: h
        };
    }
    function fn(t, e, n, i, r) {
        if (!e) {
            return '';
        }
        var a = (t + '').split('\n');
        r = dn(e, n, i, r);
        for (o = 0, s = a.length, void 0; s > o; o++) {
            var o;
            var s;
            a[o] = pn(a[o], r);
        }
        return a.join('\n');
    }
    function dn(t, e, n, i) {
        i = o({}, i);
        i.font = e;
        var n = D(n, '...');
        i.maxIterations = D(i.maxIterations, 2);
        var r = (i.minChar = D(i.minChar, 0));
        i.cnCharWidth = an('国', e);
        var a = (i.ascCharWidth = an('a', e));
        i.placeholder = D(i.placeholder, '');
        for (s = t = Math.max(0, t - 1), l = 0, void 0; r > l && s >= a; l++) {
            var s;
            var l;
            s -= a;
        }
        var h = an(n);
        if (h > s) {
            n = '';
            h = 0;
        }
        s = t - h;
        i.ellipsis = n;
        i.ellipsisWidth = h;
        i.contentWidth = s;
        i.containerWidth = t;
        return i;
    }
    function pn(t, e) {
        var n = e.containerWidth;
        var i = e.font;
        var r = e.contentWidth;
        if (!n) {
            return '';
        }
        var a = an(t, i);
        if (n >= a) {
            return t;
        }
        for (var o = 0; ; o++) {
            if (r >= a || o >= e.maxIterations) {
                t += e.ellipsis;
                break;
            }
            var s = 0 === o ? gn(t, r, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor((t.length * r) / a) : 0;
            t = t.substr(0, s);
            a = an(t, i);
        }
        if ('' === t) {
            t = e.placeholder;
        }
        return t;
    }
    function gn(t, e, n, i) {
        for (r = 0, a = 0, o = t.length, void 0; o > a && e > r; a++) {
            var r;
            var a;
            var o;
            var s = t.charCodeAt(a);
            r += s >= 0 && 127 >= s ? n : i;
        }
        return a;
    }
    function vn(t) {
        return an('国', t);
    }
    function mn(t, e) {
        return zc.measureText(t, e);
    }
    function yn(t, e, n, i) {
        if (null != t) {
            t += '';
        }
        var r = vn(e);
        var a = t ? t.split('\n') : [];
        var o = a.length * r;
        var s = o;
        if (n) {
            s += n[0] + n[2];
        }
        if (t && i) {
            var l = i.outerHeight;
            var h = i.outerWidth;
            if (null != l && s > l) {
                t = '';
                a = [];
            } else if (null != h) {
                for (
                    u = dn(h - (n ? n[1] + n[3] : 0), e, i.ellipsis, {
                        minChar: i.minChar,
                        placeholder: i.placeholder
                    }),
                        c = 0,
                        f = a.length,
                        void 0;
                    f > c;
                    c++
                ) {
                    var u;
                    var c;
                    var f;
                    a[c] = pn(a[c], u);
                }
            }
        }
        return {
            lines: a,
            height: o,
            outerHeight: s,
            lineHeight: r
        };
    }
    function _n(t, e) {
        var n = {
            lines: [],
            width: 0,
            height: 0
        };
        if (null != t) {
            t += '';
        }
        if (!t) {
            return n;
        }
        for (r = Rc.lastIndex = 0, void 0; null != (i = Rc.exec(t)); ) {
            var i;
            var r;
            var a = i.index;
            if (a > r) {
                xn(n, t.substring(r, a));
            }
            xn(n, i[2], i[1]);
            r = Rc.lastIndex;
        }
        if (r < t.length) {
            xn(n, t.substring(r, t.length));
        }
        var o = n.lines;
        var s = 0;
        var l = 0;
        var h = [];
        var u = e.textPadding;
        var c = e.truncate;
        var f = c && c.outerWidth;
        var d = c && c.outerHeight;
        if (u) {
            if (null != f) {
                f -= u[1] + u[3];
            }
            if (null != d) {
                d -= u[0] + u[2];
            }
        }
        for (var p = 0; p < o.length; p++) {
            for (g = o[p], v = 0, m = 0, y = 0, void 0; y < g.tokens.length; y++) {
                var g;
                var v;
                var m;
                var y;
                var _ = g.tokens[y];
                var x = (_.styleName && e.rich[_.styleName]) || {};
                var w = (_.textPadding = x.textPadding);
                var b = (_.font = x.font || e.font);
                var M = (_.textHeight = D(x.textHeight, vn(b)));
                if (w) {
                    M += w[0] + w[2];
                }
                _.height = M;
                _.lineHeight = I(x.textLineHeight, e.textLineHeight, M);
                _.textAlign = (x && x.textAlign) || e.textAlign;
                _.textVerticalAlign = (x && x.textVerticalAlign) || 'middle';
                if (null != d && s + _.lineHeight > d) {
                    return {
                        lines: [],
                        width: 0,
                        height: 0
                    };
                }
                _.textWidth = an(_.text, b);
                var S = x.textWidth;
                var C = null == S || 'auto' === S;
                if ('string' == typeof S && '%' === S.charAt(S.length - 1)) {
                    _.percentWidth = S;
                    h.push(_);
                    S = 0;
                } else {
                    if (C) {
                        S = _.textWidth;
                        var T = x.textBackgroundColor;
                        var k = T && T.image;
                        if (k) {
                            k = tn(k);
                            if (rn(k)) {
                                S = Math.max(S, (k.width * M) / k.height);
                            }
                        }
                    }
                    var A = w ? w[1] + w[3] : 0;
                    S += A;
                    var L = null != f ? f - m : null;
                    if (null != L && S > L) {
                        !C || A > L
                            ? ((_.text = ''), (_.textWidth = S = 0))
                            : ((_.text = fn(_.text, L - A, b, c.ellipsis, {
                                  minChar: c.minChar
                              })),
                              (_.textWidth = an(_.text, b)),
                              (S = _.textWidth + A));
                    }
                }
                m += _.width = S;
                if (x) {
                    v = Math.max(v, _.lineHeight);
                }
            }
            g.width = m;
            g.lineHeight = v;
            s += v;
            l = Math.max(l, m);
        }
        n.outerWidth = n.width = D(e.textWidth, l);
        n.outerHeight = n.height = D(e.textHeight, s);
        if (u) {
            n.outerWidth += u[1] + u[3];
            n.outerHeight += u[0] + u[2];
        }
        for (var p = 0; p < h.length; p++) {
            var _ = h[p];
            var P = _.percentWidth;
            _.width = (parseInt(P, 10) / 100) * l;
        }
        return n;
    }
    function xn(t, e, n) {
        for (i = '' === e, r = e.split('\n'), a = t.lines, o = 0, void 0; o < r.length; o++) {
            var i;
            var r;
            var a;
            var o;
            var s = r[o];
            var l = {
                styleName: n,
                text: s,
                isLineHolder: !s && !i
            };
            if (o) {
                a.push({
                    tokens: [l]
                });
            } else {
                var h = (
                    a[a.length - 1] ||
                    (a[0] = {
                        tokens: []
                    })
                ).tokens;
                var u = h.length;
                1 === u && h[0].isLineHolder ? (h[0] = l) : (s || !u || i) && h.push(l);
            }
        }
    }
    function wn(t) {
        var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + 'px', t.fontFamily || 'sans-serif'].join(' ');
        return (e && O(e)) || t.textFont || t.font;
    }
    function bn(t, e) {
        var n;
        var i;
        var r;
        var a;
        var o = e.x;
        var s = e.y;
        var l = e.width;
        var h = e.height;
        var u = e.r;
        if (0 > l) {
            o += l;
            l = -l;
        }
        if (0 > h) {
            s += h;
            h = -h;
        }
        'number' == typeof u
            ? (n = i = r = a = u)
            : u instanceof Array
            ? 1 === u.length
                ? (n = i = r = a = u[0])
                : 2 === u.length
                ? ((n = r = u[0]), (i = a = u[1]))
                : 3 === u.length
                ? ((n = u[0]), (i = a = u[1]), (r = u[2]))
                : ((n = u[0]), (i = u[1]), (r = u[2]), (a = u[3]))
            : (n = i = r = a = 0);
        var c;
        if (n + i > l) {
            c = n + i;
            n *= l / c;
            i *= l / c;
        }
        if (r + a > l) {
            c = r + a;
            r *= l / c;
            a *= l / c;
        }
        if (i + r > h) {
            c = i + r;
            i *= h / c;
            r *= h / c;
        }
        if (n + a > h) {
            c = n + a;
            n *= h / c;
            a *= h / c;
        }
        t.moveTo(o + n, s);
        t.lineTo(o + l - i, s);
        if (0 !== i) {
            t.arc(o + l - i, s + i, i, -Math.PI / 2, 0);
        }
        t.lineTo(o + l, s + h - r);
        if (0 !== r) {
            t.arc(o + l - r, s + h - r, r, 0, Math.PI / 2);
        }
        t.lineTo(o + a, s + h);
        if (0 !== a) {
            t.arc(o + a, s + h - a, a, Math.PI / 2, Math.PI);
        }
        t.lineTo(o, s + n);
        if (0 !== n) {
            t.arc(o + n, s + n, n, Math.PI, 1.5 * Math.PI);
        }
    }
    function Mn(t) {
        Sn(t);
        d(t.rich, Sn);
        return t;
    }
    function Sn(t) {
        if (t) {
            t.font = wn(t);
            var e = t.textAlign;
            if ('middle' === e) {
                e = 'center';
            }
            t.textAlign = null == e || Nc[e] ? e : 'left';
            var n = t.textVerticalAlign || t.textBaseline;
            if ('center' === n) {
                n = 'middle';
            }
            t.textVerticalAlign = null == n || Fc[n] ? n : 'top';
            var i = t.textPadding;
            if (i) {
                t.textPadding = L(t.textPadding);
            }
        }
    }
    function Cn(t, e, n, i, r) {
        i.rich ? kn(t, e, n, i, r) : Tn(t, e, n, i, r);
    }
    function Tn(t, e, n, i, r) {
        var a = Rn(e, 'font', i.font || Bc);
        var o = i.textPadding;
        var s = t.__textCotentBlock;
        if (!s || t.__dirty) {
            s = t.__textCotentBlock = yn(n, a, o, i.truncate);
        }
        var l = s.outerHeight;
        var h = s.lines;
        var u = s.lineHeight;
        var c = En(l, i, r);
        var f = c.baseX;
        var d = c.baseY;
        var p = c.textAlign;
        var g = c.textVerticalAlign;
        In(e, i, r, f, d);
        var v = un(d, l, g);
        var m = f;
        var y = v;
        var _ = Ln(i);
        if (_ || o) {
            var x = an(n, a);
            var w = x;
            if (o) {
                w += o[1] + o[3];
            }
            var b = hn(f, w, p);
            if (_) {
                Pn(t, e, i, b, v, w, l);
            }
            if (o) {
                m = Fn(f, p, o);
                y += o[0];
            }
        }
        Rn(e, 'textAlign', p || 'left');
        Rn(e, 'textBaseline', 'middle');
        Rn(e, 'shadowBlur', i.textShadowBlur || 0);
        Rn(e, 'shadowColor', i.textShadowColor || 'transparent');
        Rn(e, 'shadowOffsetX', i.textShadowOffsetX || 0);
        Rn(e, 'shadowOffsetY', i.textShadowOffsetY || 0);
        y += u / 2;
        var M = i.textStrokeWidth;
        var S = Bn(i.textStroke, M);
        var C = zn(i.textFill);
        if (S) {
            Rn(e, 'lineWidth', M);
            Rn(e, 'strokeStyle', S);
        }
        if (C) {
            Rn(e, 'fillStyle', C);
        }
        for (var T = 0; T < h.length; T++) {
            if (S) {
                e.strokeText(h[T], m, y);
            }
            if (C) {
                e.fillText(h[T], m, y);
            }
            y += u;
        }
    }
    function kn(t, e, n, i, r) {
        var a = t.__textCotentBlock;
        if (!a || t.__dirty) {
            a = t.__textCotentBlock = _n(n, i);
        }
        Dn(t, e, a, i, r);
    }
    function Dn(t, e, n, i, r) {
        var a = n.width;
        var o = n.outerWidth;
        var s = n.outerHeight;
        var l = i.textPadding;
        var h = En(s, i, r);
        var u = h.baseX;
        var c = h.baseY;
        var f = h.textAlign;
        var d = h.textVerticalAlign;
        In(e, i, r, u, c);
        var p = hn(u, o, f);
        var g = un(c, s, d);
        var v = p;
        var m = g;
        if (l) {
            v += l[3];
            m += l[0];
        }
        var y = v + a;
        if (Ln(i)) {
            Pn(t, e, i, p, g, o, s);
        }
        for (var _ = 0; _ < n.lines.length; _++) {
            for (
                w = n.lines[_], b = w.tokens, M = b.length, S = w.lineHeight, C = w.width, T = 0, k = v, D = y, I = M - 1, void 0;
                M > T && ((x = b[T]), !x.textAlign || 'left' === x.textAlign);

            ) {
                var x;
                var w;
                var b;
                var M;
                var S;
                var C;
                var T;
                var k;
                var D;
                var I;
                An(t, e, x, i, S, m, k, 'left');
                C -= x.width;
                k += x.width;
                T++;
            }
            for (; I >= 0 && ((x = b[I]), 'right' === x.textAlign); ) {
                An(t, e, x, i, S, m, D, 'right');
                C -= x.width;
                D -= x.width;
                I--;
            }
            for (k += (a - (k - v) - (y - D) - C) / 2; I >= T; ) {
                x = b[T];
                An(t, e, x, i, S, m, k + x.width / 2, 'center');
                k += x.width;
                T++;
            }
            m += S;
        }
    }
    function In(t, e, n, i, r) {
        if (n && e.textRotation) {
            var a = e.textOrigin;
            'center' === a ? ((i = n.width / 2 + n.x), (r = n.height / 2 + n.y)) : a && ((i = a[0] + n.x), (r = a[1] + n.y));
            t.translate(i, r);
            t.rotate(-e.textRotation);
            t.translate(-i, -r);
        }
    }
    function An(t, e, n, i, r, a, o, s) {
        var l = i.rich[n.styleName] || {};
        var h = n.textVerticalAlign;
        var u = a + r / 2;
        'top' === h ? (u = a + n.height / 2) : 'bottom' === h && (u = a + r - n.height / 2);
        if (!n.isLineHolder && Ln(l)) {
            Pn(t, e, l, 'right' === s ? o - n.width : 'center' === s ? o - n.width / 2 : o, u - n.height / 2, n.width, n.height);
        }
        var c = n.textPadding;
        if (c) {
            o = Fn(o, s, c);
            u -= n.height / 2 - c[2] - n.textHeight / 2;
        }
        Rn(e, 'shadowBlur', I(l.textShadowBlur, i.textShadowBlur, 0));
        Rn(e, 'shadowColor', l.textShadowColor || i.textShadowColor || 'transparent');
        Rn(e, 'shadowOffsetX', I(l.textShadowOffsetX, i.textShadowOffsetX, 0));
        Rn(e, 'shadowOffsetY', I(l.textShadowOffsetY, i.textShadowOffsetY, 0));
        Rn(e, 'textAlign', s);
        Rn(e, 'textBaseline', 'middle');
        Rn(e, 'font', n.font || Bc);
        var f = Bn(l.textStroke || i.textStroke, p);
        var d = zn(l.textFill || i.textFill);
        var p = D(l.textStrokeWidth, i.textStrokeWidth);
        if (f) {
            Rn(e, 'lineWidth', p);
            Rn(e, 'strokeStyle', f);
            e.strokeText(n.text, o, u);
        }
        if (d) {
            Rn(e, 'fillStyle', d);
            e.fillText(n.text, o, u);
        }
    }
    function Ln(t) {
        return t.textBackgroundColor || (t.textBorderWidth && t.textBorderColor);
    }
    function Pn(t, e, n, i, r, a, o) {
        var s = n.textBackgroundColor;
        var l = n.textBorderWidth;
        var h = n.textBorderColor;
        var u = w(s);
        Rn(e, 'shadowBlur', n.textBoxShadowBlur || 0);
        Rn(e, 'shadowColor', n.textBoxShadowColor || 'transparent');
        Rn(e, 'shadowOffsetX', n.textBoxShadowOffsetX || 0);
        Rn(e, 'shadowOffsetY', n.textBoxShadowOffsetY || 0);
        if (u || (l && h)) {
            e.beginPath();
            var c = n.textBorderRadius;
            c
                ? bn(e, {
                      x: i,
                      y: r,
                      width: a,
                      height: o,
                      r: c
                  })
                : e.rect(i, r, a, o);
            e.closePath();
        }
        if (u) {
            Rn(e, 'fillStyle', s);
            e.fill();
        } else if (b(s)) {
            var f = s.image;
            f = en(f, null, t, On, s);
            if (f && rn(f)) {
                e.drawImage(f, i, r, a, o);
            }
        }
        if (l && h) {
            Rn(e, 'lineWidth', l);
            Rn(e, 'strokeStyle', h);
            e.stroke();
        }
    }
    function On(t, e) {
        e.image = t;
    }
    function En(t, e, n) {
        var i = e.x || 0;
        var r = e.y || 0;
        var a = e.textAlign;
        var o = e.textVerticalAlign;
        if (n) {
            var s = e.textPosition;
            if (s instanceof Array) {
                i = n.x + Nn(s[0], n.width);
                r = n.y + Nn(s[1], n.height);
            } else {
                var l = cn(s, n, e.textDistance);
                i = l.x;
                r = l.y;
                a = a || l.textAlign;
                o = o || l.textVerticalAlign;
            }
            var h = e.textOffset;
            if (h) {
                i += h[0];
                r += h[1];
            }
        }
        return {
            baseX: i,
            baseY: r,
            textAlign: a,
            textVerticalAlign: o
        };
    }
    function Rn(t, e, n) {
        t[e] = bc(t, e, n);
        return t[e];
    }
    function Bn(t, e) {
        return null == t || 0 >= e || 'transparent' === t || 'none' === t ? null : t.image || t.colorStops ? '#000' : t;
    }
    function zn(t) {
        return null == t || 'none' === t ? null : t.image || t.colorStops ? '#000' : t;
    }
    function Nn(t, e) {
        return 'string' == typeof t ? (t.lastIndexOf('%') >= 0 ? (parseFloat(t) / 100) * e : parseFloat(t)) : t;
    }
    function Fn(t, e, n) {
        return 'right' === e ? t - n[1] : 'center' === e ? t + n[3] / 2 - n[1] / 2 : t + n[3];
    }
    function Vn(t, e) {
        return null != t && (t || e.textBackgroundColor || (e.textBorderWidth && e.textBorderColor) || e.textPadding);
    }
    function Wn(t) {
        t = t || {};
        dc.call(this, t);
        for (var e in t) {
            if (t.hasOwnProperty(e) && 'style' !== e) {
                this[e] = t[e];
            }
        }
        this.style = new Sc(t.style, this);
        this._rect = null;
        this.__clipPaths = [];
    }
    function Hn(t) {
        Wn.call(this, t);
    }
    function Gn(t) {
        return parseInt(t, 10);
    }
    function qn(t) {
        return t ? (t.__builtin__ ? true : 'function' != typeof t.resize || 'function' != typeof t.refresh ? false : true) : false;
    }
    function Xn(t, e, n) {
        Uc.copy(t.getBoundingRect());
        if (t.transform) {
            Uc.applyTransform(t.transform);
        }
        Yc.width = e;
        Yc.height = n;
        return !Uc.intersect(Yc);
    }
    function Un(t, e) {
        if (t == e) {
            return false;
        }
        if (!t || !e || t.length !== e.length) {
            return true;
        }
        for (var n = 0; n < t.length; n++) {
            if (t[n] !== e[n]) {
                return true;
            }
        }
    }
    function Yn(t, e) {
        for (var n = 0; n < t.length; n++) {
            var i = t[n];
            i.setTransform(e);
            e.beginPath();
            i.buildPath(e, i.shape);
            e.clip();
            i.restoreTransform(e);
        }
    }
    function jn(t, e) {
        var n = document.createElement('div');
        n.style.cssText = ['position:relative', 'overflow:hidden', 'width:' + t + 'px', 'height:' + e + 'px', 'padding:0', 'margin:0', 'border-width:0'].join(';') + ';';
        return n;
    }
    function Zn(t) {
        return t.getBoundingClientRect
            ? t.getBoundingClientRect()
            : {
                  left: 0,
                  top: 0
              };
    }
    function $n(t, e, n, i) {
        n = n || {};
        i || !bu.canvasSupported
            ? Kn(t, e, n)
            : bu.browser.firefox && null != e.layerX && e.layerX !== e.offsetX
            ? ((n.zrX = e.layerX), (n.zrY = e.layerY))
            : null != e.offsetX
            ? ((n.zrX = e.offsetX), (n.zrY = e.offsetY))
            : Kn(t, e, n);
        return n;
    }
    function Kn(t, e, n) {
        var i = Zn(t);
        n.zrX = e.clientX - i.left;
        n.zrY = e.clientY - i.top;
    }
    function Qn(t, e, n) {
        e = e || window.event;
        if (null != e.zrX) {
            return e;
        }
        var i = e.type;
        var r = i && i.indexOf('touch') >= 0;
        if (r) {
            var a = 'touchend' != i ? e.targetTouches[0] : e.changedTouches[0];
            if (a) {
                $n(t, a, e, n);
            }
        } else {
            $n(t, e, e, n);
            e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
        }
        var o = e.button;
        if (null == e.which && void 0 !== o && $c.test(e.type)) {
            e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0;
        }
        return e;
    }
    function Jn(t, e, n) {
        Zc ? t.addEventListener(e, n) : t.attachEvent('on' + e, n);
    }
    function ti(t, e, n) {
        Zc ? t.removeEventListener(e, n) : t.detachEvent('on' + e, n);
    }
    function ei(t) {
        var e = t[1][0] - t[0][0];
        var n = t[1][1] - t[0][1];
        return Math.sqrt(e * e + n * n);
    }
    function ni(t) {
        return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2];
    }
    function ii(t) {
        return 'mousewheel' === t && bu.browser.firefox ? 'DOMMouseScroll' : t;
    }
    function ri(t, e, n) {
        var i = t._gestureMgr;
        if ('start' === n) {
            i.clear();
        }
        var r = i.recognize(e, t.handler.findHover(e.zrX, e.zrY, null).target, t.dom);
        if ('end' === n) {
            i.clear();
        }
        if (r) {
            var a = r.type;
            e.gestureEvent = a;
            t.handler.dispatchToElement(
                {
                    target: r.target
                },
                a,
                r.event
            );
        }
    }
    function ai(t) {
        t._touching = true;
        clearTimeout(t._touchTimer);
        t._touchTimer = setTimeout(function () {
            t._touching = false;
        }, 700);
    }
    function oi(t) {
        var e = t.pointerType;
        return 'pen' === e || 'touch' === e;
    }
    function si(t) {
        function e(t, e) {
            return function () {
                return e._touching ? void 0 : t.apply(e, arguments);
            };
        }
        d(nf, function (e) {
            t._handlers[e] = m(of[e], t);
        });
        d(af, function (e) {
            t._handlers[e] = m(of[e], t);
        });
        d(ef, function (n) {
            t._handlers[n] = e(of[n], t);
        });
    }
    function li(t) {
        function e(e, n) {
            d(
                e,
                function (e) {
                    Jn(t, ii(e), n._handlers[e]);
                },
                n
            );
        }
        Vu.call(this);
        this.dom = t;
        this._touching = false;
        this._touchTimer;
        this._gestureMgr = new Qc();
        this._handlers = {};
        si(this);
        bu.pointerEventsSupported ? e(af, this) : (bu.touchEventsSupported && e(nf, this), e(ef, this));
    }
    function hi(t, e) {
        var n = new uf(xu(), t, e);
        return n;
    }
    function ui(t) {
        return t instanceof Array ? t : null == t ? [] : [t];
    }
    function ci(t, e, n) {
        if (t) {
            t[e] = t[e] || {};
            t.emphasis = t.emphasis || {};
            t.emphasis[e] = t.emphasis[e] || {};
            for (i = 0, r = n.length, void 0; r > i; i++) {
                var i;
                var r;
                var a = n[i];
                if (!t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a)) {
                    t.emphasis[e][a] = t[e][a];
                }
            }
        }
    }
    function fi(t) {
        return !ff(t) || df(t) || t instanceof Date ? t : t.value;
    }
    function di(t) {
        return ff(t) && !(t instanceof Array);
    }
    function pi(t, e) {
        e = (e || []).slice();
        var n = p(t || [], function (t) {
            return {
                exist: t
            };
        });
        cf(e, function (t, i) {
            if (ff(t)) {
                for (var r = 0; r < n.length; r++) {
                    if (!n[r].option && null != t.id && n[r].exist.id === t.id + '') {
                        n[r].option = t;
                        return void (e[i] = null);
                    }
                }
                for (var r = 0; r < n.length; r++) {
                    var a = n[r].exist;
                    if (!(n[r].option || (null != a.id && null != t.id) || null == t.name || mi(t) || mi(a) || a.name !== t.name + '')) {
                        n[r].option = t;
                        return void (e[i] = null);
                    }
                }
            }
        });
        cf(e, function (t) {
            if (ff(t)) {
                for (var e = 0; e < n.length; e++) {
                    var i = n[e].exist;
                    if (!n[e].option && !mi(i) && null == t.id) {
                        n[e].option = t;
                        break;
                    }
                }
                if (e >= n.length) {
                    n.push({
                        option: t
                    });
                }
            }
        });
        return n;
    }
    function gi(t) {
        var e = z();
        cf(t, function (t) {
            var n = t.exist;
            if (n) {
                e.set(n.id, t);
            }
        });
        cf(t, function (t) {
            var n = t.option;
            P(!n || null == n.id || !e.get(n.id) || e.get(n.id) === t, 'id duplicates: ' + (n && n.id));
            if (n && null != n.id) {
                e.set(n.id, t);
            }
            if (!t.keyInfo) {
                t.keyInfo = {};
            }
        });
        cf(t, function (t, n) {
            var i = t.exist;
            var r = t.option;
            var a = t.keyInfo;
            if (ff(r)) {
                a.name = null != r.name ? r.name + '' : i ? i.name : pf + n;
                if (i) a.id = i.id;
                else if (null != r.id) {
                    a.id = r.id + '';
                } else {
                    var o = 0;
                    do a.id = '\0' + a.name + '\0' + o++;
                    while (e.get(a.id));
                }
                e.set(a.id, t);
            }
        });
    }
    function vi(t) {
        var e = t.name;
        return !(!e || !e.indexOf(pf));
    }
    function mi(t) {
        return ff(t) && t.id && 0 === (t.id + '').indexOf('\0_ec_\0');
    }
    function yi(t, e) {
        return null != e.dataIndexInside
            ? e.dataIndexInside
            : null != e.dataIndex
            ? _(e.dataIndex)
                ? p(e.dataIndex, function (e) {
                      return t.indexOfRawIndex(e);
                  })
                : t.indexOfRawIndex(e.dataIndex)
            : null != e.name
            ? _(e.name)
                ? p(e.name, function (e) {
                      return t.indexOfName(e);
                  })
                : t.indexOfName(e.name)
            : void 0;
    }
    function _i() {
        var t = '__\0ec_inner_' + vf++ + '_' + Math.random().toFixed(5);
        return function (e) {
            return e[t] || (e[t] = {});
        };
    }
    function xi(t, e, n) {
        if (w(e)) {
            var i = {};
            i[e + 'Index'] = 0;
            e = i;
        }
        var r = n && n.defaultMainType;
        !r || wi(e, r + 'Index') || wi(e, r + 'Id') || wi(e, r + 'Name') || (e[r + 'Index'] = 0);
        var a = {};
        cf(e, function (i, r) {
            var i = e[r];
            if ('dataIndex' === r || 'dataIndexInside' === r) {
                return void (a[r] = i);
            }
            var o = r.match(/^(\w+)(Index|Id|Name)$/) || [];
            var s = o[1];
            var l = (o[2] || '').toLowerCase();
            if (!(!s || !l || null == i || ('index' === l && 'none' === i) || (n && n.includeMainTypes && h(n.includeMainTypes, s) < 0))) {
                var u = {
                    mainType: s
                };
                if ('index' !== l || 'all' !== i) {
                    u[l] = i;
                }
                var c = t.queryComponents(u);
                a[s + 'Models'] = c;
                a[s + 'Model'] = c[0];
            }
        });
        return a;
    }
    function wi(t, e) {
        return t && t.hasOwnProperty(e);
    }
    function bi(t, e, n) {
        t.setAttribute ? t.setAttribute(e, n) : (t[e] = n);
    }
    function Mi(t, e) {
        return t.getAttribute ? t.getAttribute(e) : t[e];
    }
    function Si(t) {
        var e = {
            main: '',
            sub: ''
        };
        if (t) {
            t = t.split(mf);
            e.main = t[0] || '';
            e.sub = t[1] || '';
        }
        return e;
    }
    function Ci(t) {
        P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
    }
    function Ti(t) {
        t.$constructor = t;
        t.extend = function (t) {
            var that = this;
            var n = function () {
                t.$constructor ? t.$constructor.apply(this, arguments) : that.apply(this, arguments);
            };
            o(n.prototype, t);
            n.extend = this.extend;
            n.superCall = Di;
            n.superApply = Ii;
            u(n, this);
            n.superClass = that;
            return n;
        };
    }
    function ki(t) {
        var e = ['__\0is_clz', _f++, Math.random().toFixed(3)].join('_');
        t.prototype[e] = true;
        t.isInstance = function (t) {
            return !(!t || !t[e]);
        };
    }
    function Di(t, e) {
        var n = A(arguments, 2);
        return this.superClass.prototype[e].apply(t, n);
    }
    function Ii(t, e, n) {
        return this.superClass.prototype[e].apply(t, n);
    }
    function Ai(t, e) {
        function n(t) {
            var e = i[t.main];
            (e && e[yf]) || ((e = i[t.main] = {}), (e[yf] = true));
            return e;
        }
        e = e || {};
        var i = {};
        t.registerClass = function (t, e) {
            if (e) {
                e = Si(e);
                {
                    Ci(e);
                    if (e.sub) {
                        if (e.sub !== yf) {
                            var r = n(e);
                            r[e.sub] = t;
                        }
                    } else {
                        i[e.main] = t;
                    }
                }
            }
            return t;
        };
        t.getClass = function (t, e, n) {
            var r = i[t];
            if (r && r[yf]) {
                r = e ? r[e] : null;
            }
            if (n && !r) {
                throw new Error(e ? 'Component ' + t + '.' + (e || '') + ' not exists. Load it first.' : t + '.type should be specified.');
            }
            return r;
        };
        t.getClassesByMainType = function (t) {
            t = Si(t);
            var e = [];
            var n = i[t.main];
            n && n[yf]
                ? d(n, function (t, n) {
                      if (n !== yf) {
                          e.push(t);
                      }
                  })
                : e.push(n);
            return e;
        };
        t.hasClass = function (t) {
            t = Si(t);
            return !!i[t.main];
        };
        t.getAllClassMainTypes = function () {
            var t = [];
            d(i, function (e, n) {
                t.push(n);
            });
            return t;
        };
        t.hasSubTypes = function (t) {
            t = Si(t);
            var e = i[t.main];
            return e && e[yf];
        };
        t.parseClassType = Si;
        if (e.registerWhenExtend) {
            var r = t.extend;
            if (r) {
                t.extend = function (e) {
                    var n = r.call(this, e);
                    return t.registerClass(n, e.type);
                };
            }
        }
        return t;
    }
    function Li(t) {
        return t > -kf && kf > t;
    }
    function Pi(t) {
        return t > kf || -kf > t;
    }
    function Oi(t, e, n, i, r) {
        var a = 1 - r;
        return a * a * (a * t + 3 * r * e) + r * r * (r * i + 3 * a * n);
    }
    function Ei(t, e, n, i, r) {
        var a = 1 - r;
        return 3 * (((e - t) * a + 2 * (n - e) * r) * a + (i - n) * r * r);
    }
    function Ri(t, e, n, i, r, a) {
        var o = i + 3 * (e - n) - t;
        var s = 3 * (n - 2 * e + t);
        var l = 3 * (e - t);
        var h = t - r;
        var u = s * s - 3 * o * l;
        var c = s * l - 9 * o * h;
        var f = l * l - 3 * s * h;
        var d = 0;
        if (Li(u) && Li(c)) {
            if (Li(s)) {
                a[0] = 0;
            } else {
                var p = -l / s;
                if (p >= 0 && 1 >= p) {
                    a[d++] = p;
                }
            }
        } else {
            var g = c * c - 4 * u * f;
            if (Li(g)) {
                var v = c / u;
                var p = -s / o + v;
                var m = -v / 2;
                if (p >= 0 && 1 >= p) {
                    a[d++] = p;
                }
                if (m >= 0 && 1 >= m) {
                    a[d++] = m;
                }
            } else if (g > 0) {
                var y = Tf(g);
                var _ = u * s + 1.5 * o * (-c + y);
                var x = u * s + 1.5 * o * (-c - y);
                _ = 0 > _ ? -Cf(-_, Af) : Cf(_, Af);
                x = 0 > x ? -Cf(-x, Af) : Cf(x, Af);
                var p = (-s - (_ + x)) / (3 * o);
                if (p >= 0 && 1 >= p) {
                    a[d++] = p;
                }
            } else {
                var w = (2 * u * s - 3 * o * c) / (2 * Tf(u * u * u));
                var b = Math.acos(w) / 3;
                var M = Tf(u);
                var S = Math.cos(b);
                var p = (-s - 2 * M * S) / (3 * o);
                var m = (-s + M * (S + If * Math.sin(b))) / (3 * o);
                var C = (-s + M * (S - If * Math.sin(b))) / (3 * o);
                if (p >= 0 && 1 >= p) {
                    a[d++] = p;
                }
                if (m >= 0 && 1 >= m) {
                    a[d++] = m;
                }
                if (C >= 0 && 1 >= C) {
                    a[d++] = C;
                }
            }
        }
        return d;
    }
    function Bi(t, e, n, i, r) {
        var a = 6 * n - 12 * e + 6 * t;
        var o = 9 * e + 3 * i - 3 * t - 9 * n;
        var s = 3 * e - 3 * t;
        var l = 0;
        if (Li(o)) {
            if (Pi(a)) {
                var h = -s / a;
                if (h >= 0 && 1 >= h) {
                    r[l++] = h;
                }
            }
        } else {
            var u = a * a - 4 * o * s;
            if (Li(u)) r[0] = -a / (2 * o);
            else if (u > 0) {
                var c = Tf(u);
                var h = (-a + c) / (2 * o);
                var f = (-a - c) / (2 * o);
                if (h >= 0 && 1 >= h) {
                    r[l++] = h;
                }
                if (f >= 0 && 1 >= f) {
                    r[l++] = f;
                }
            }
        }
        return l;
    }
    function zi(t, e, n, i, r, a) {
        var o = (e - t) * r + t;
        var s = (n - e) * r + e;
        var l = (i - n) * r + n;
        var h = (s - o) * r + o;
        var u = (l - s) * r + s;
        var c = (u - h) * r + h;
        a[0] = t;
        a[1] = o;
        a[2] = h;
        a[3] = c;
        a[4] = c;
        a[5] = u;
        a[6] = l;
        a[7] = i;
    }
    function Ni(t, e, n, i, r, a, o, s, l, h, u) {
        var c;
        var f;
        var d;
        var p;
        var g;
        var v = 0.005;
        var m = 1 / 0;
        Lf[0] = l;
        Lf[1] = h;
        for (var y = 0; 1 > y; y += 0.05) {
            Pf[0] = Oi(t, n, r, o, y);
            Pf[1] = Oi(e, i, a, s, y);
            p = Nu(Lf, Pf);
            if (m > p) {
                c = y;
                m = p;
            }
        }
        m = 1 / 0;
        for (var _ = 0; 32 > _ && !(Df > v); _++) {
            f = c - v;
            d = c + v;
            Pf[0] = Oi(t, n, r, o, f);
            Pf[1] = Oi(e, i, a, s, f);
            p = Nu(Pf, Lf);
            f >= 0 && m > p ? ((c = f), (m = p)) : ((Of[0] = Oi(t, n, r, o, d)), (Of[1] = Oi(e, i, a, s, d)), (g = Nu(Of, Lf)), 1 >= d && m > g ? ((c = d), (m = g)) : (v *= 0.5));
        }
        if (u) {
            u[0] = Oi(t, n, r, o, c);
            u[1] = Oi(e, i, a, s, c);
        }
        return Tf(m);
    }
    function Fi(t, e, n, i) {
        var r = 1 - i;
        return r * (r * t + 2 * i * e) + i * i * n;
    }
    function Vi(t, e, n, i) {
        return 2 * ((1 - i) * (e - t) + i * (n - e));
    }
    function Wi(t, e, n, i, r) {
        var a = t - 2 * e + n;
        var o = 2 * (e - t);
        var s = t - i;
        var l = 0;
        if (Li(a)) {
            if (Pi(o)) {
                var h = -s / o;
                if (h >= 0 && 1 >= h) {
                    r[l++] = h;
                }
            }
        } else {
            var u = o * o - 4 * a * s;
            if (Li(u)) {
                var h = -o / (2 * a);
                if (h >= 0 && 1 >= h) {
                    r[l++] = h;
                }
            } else if (u > 0) {
                var c = Tf(u);
                var h = (-o + c) / (2 * a);
                var f = (-o - c) / (2 * a);
                if (h >= 0 && 1 >= h) {
                    r[l++] = h;
                }
                if (f >= 0 && 1 >= f) {
                    r[l++] = f;
                }
            }
        }
        return l;
    }
    function Hi(t, e, n) {
        var i = t + n - 2 * e;
        return 0 === i ? 0.5 : (t - e) / i;
    }
    function Gi(t, e, n, i, r) {
        var a = (e - t) * i + t;
        var o = (n - e) * i + e;
        var s = (o - a) * i + a;
        r[0] = t;
        r[1] = a;
        r[2] = s;
        r[3] = s;
        r[4] = o;
        r[5] = n;
    }
    function qi(t, e, n, i, r, a, o, s, l) {
        var h;
        var u = 0.005;
        var c = 1 / 0;
        Lf[0] = o;
        Lf[1] = s;
        for (var f = 0; 1 > f; f += 0.05) {
            Pf[0] = Fi(t, n, r, f);
            Pf[1] = Fi(e, i, a, f);
            var d = Nu(Lf, Pf);
            if (c > d) {
                h = f;
                c = d;
            }
        }
        c = 1 / 0;
        for (var p = 0; 32 > p && !(Df > u); p++) {
            var g = h - u;
            var v = h + u;
            Pf[0] = Fi(t, n, r, g);
            Pf[1] = Fi(e, i, a, g);
            var d = Nu(Pf, Lf);
            if (g >= 0 && c > d) {
                h = g;
                c = d;
            } else {
                Of[0] = Fi(t, n, r, v);
                Of[1] = Fi(e, i, a, v);
                var m = Nu(Of, Lf);
                1 >= v && c > m ? ((h = v), (c = m)) : (u *= 0.5);
            }
        }
        if (l) {
            l[0] = Fi(t, n, r, h);
            l[1] = Fi(e, i, a, h);
        }
        return Tf(c);
    }
    function Xi(t, e, n, i, r, a) {
        r[0] = Ef(t, n);
        r[1] = Ef(e, i);
        a[0] = Rf(t, n);
        a[1] = Rf(e, i);
    }
    function Ui(t, e, n, i, r, a, o, s, l, h) {
        var u;
        var c = Bi;
        var f = Oi;
        var d = c(t, n, r, o, Hf);
        for (l[0] = 1 / 0, l[1] = 1 / 0, h[0] = -1 / 0, h[1] = -1 / 0, u = 0; d > u; u++) {
            var p = f(t, n, r, o, Hf[u]);
            l[0] = Ef(p, l[0]);
            h[0] = Rf(p, h[0]);
        }
        for (d = c(e, i, a, s, Gf), u = 0; d > u; u++) {
            var g = f(e, i, a, s, Gf[u]);
            l[1] = Ef(g, l[1]);
            h[1] = Rf(g, h[1]);
        }
        l[0] = Ef(t, l[0]);
        h[0] = Rf(t, h[0]);
        l[0] = Ef(o, l[0]);
        h[0] = Rf(o, h[0]);
        l[1] = Ef(e, l[1]);
        h[1] = Rf(e, h[1]);
        l[1] = Ef(s, l[1]);
        h[1] = Rf(s, h[1]);
    }
    function Yi(t, e, n, i, r, a, o, s) {
        var l = Hi;
        var h = Fi;
        var u = Rf(Ef(l(t, n, r), 1), 0);
        var c = Rf(Ef(l(e, i, a), 1), 0);
        var f = h(t, n, r, u);
        var d = h(e, i, a, c);
        o[0] = Ef(t, r, f);
        o[1] = Ef(e, a, d);
        s[0] = Rf(t, r, f);
        s[1] = Rf(e, a, d);
    }
    function ji(t, e, n, i, r, a, o, s, l) {
        var h = Q;
        var u = J;
        var c = Math.abs(r - a);
        if (0.0001 > c % Nf && c > 0.0001) {
            s[0] = t - n;
            s[1] = e - i;
            l[0] = t + n;
            return void (l[1] = e + i);
        }
        Ff[0] = zf(r) * n + t;
        Ff[1] = Bf(r) * i + e;
        Vf[0] = zf(a) * n + t;
        Vf[1] = Bf(a) * i + e;
        h(s, Ff, Vf);
        u(l, Ff, Vf);
        r %= Nf;
        if (0 > r) {
            r += Nf;
        }
        a %= Nf;
        if (0 > a) {
            a += Nf;
        }
        r > a && !o ? (a += Nf) : a > r && o && (r += Nf);
        if (o) {
            var f = a;
            a = r;
            r = f;
        }
        for (var d = 0; a > d; d += Math.PI / 2) {
            if (d > r) {
                Wf[0] = zf(d) * n + t;
                Wf[1] = Bf(d) * i + e;
                h(s, Wf, s);
                u(l, Wf, l);
            }
        }
    }
    function Zi(t, e, n, i, r, a, o) {
        if (0 === r) {
            return false;
        }
        var s = r;
        var l = 0;
        var h = t;
        if ((o > e + s && o > i + s) || (e - s > o && i - s > o) || (a > t + s && a > n + s) || (t - s > a && n - s > a)) {
            return false;
        }
        if (t === n) {
            return Math.abs(a - t) <= s / 2;
        }
        l = (e - i) / (t - n);
        h = (t * i - n * e) / (t - n);
        var u = l * a - o + h;
        var c = (u * u) / (l * l + 1);
        return ((s / 2) * s) / 2 >= c;
    }
    function $i(t, e, n, i, r, a, o, s, l, h, u) {
        if (0 === l) {
            return false;
        }
        var c = l;
        if (
            (u > e + c && u > i + c && u > a + c && u > s + c) ||
            (e - c > u && i - c > u && a - c > u && s - c > u) ||
            (h > t + c && h > n + c && h > r + c && h > o + c) ||
            (t - c > h && n - c > h && r - c > h && o - c > h)
        ) {
            return false;
        }
        var f = Ni(t, e, n, i, r, a, o, s, h, u, null);
        return c / 2 >= f;
    }
    function Ki(t, e, n, i, r, a, o, s, l) {
        if (0 === o) {
            return false;
        }
        var h = o;
        if ((l > e + h && l > i + h && l > a + h) || (e - h > l && i - h > l && a - h > l) || (s > t + h && s > n + h && s > r + h) || (t - h > s && n - h > s && r - h > s)) {
            return false;
        }
        var u = qi(t, e, n, i, r, a, s, l, null);
        return h / 2 >= u;
    }
    function Qi(t) {
        t %= id;
        if (0 > t) {
            t += id;
        }
        return t;
    }
    function Ji(t, e, n, i, r, a, o, s, l) {
        if (0 === o) {
            return false;
        }
        var h = o;
        s -= t;
        l -= e;
        var u = Math.sqrt(s * s + l * l);
        if (u - h > n || n > u + h) {
            return false;
        }
        if (Math.abs(i - r) % rd < 0.0001) {
            return true;
        }
        if (a) {
            var c = i;
            i = Qi(r);
            r = Qi(c);
        } else {
            i = Qi(i);
            r = Qi(r);
        }
        if (i > r) {
            r += rd;
        }
        var f = Math.atan2(l, s);
        if (0 > f) {
            f += rd;
        }
        return (f >= i && r >= f) || (f + rd >= i && r >= f + rd);
    }
    function tr(t, e, n, i, r, a) {
        if ((a > e && a > i) || (e > a && i > a)) {
            return 0;
        }
        if (i === e) {
            return 0;
        }
        var o = e > i ? 1 : -1;
        var s = (a - e) / (i - e);
        if (1 === s || 0 === s) {
            o = e > i ? 0.5 : -0.5;
        }
        var l = s * (n - t) + t;
        return l === r ? 1 / 0 : l > r ? o : 0;
    }
    function er(t, e) {
        return Math.abs(t - e) < sd;
    }
    function nr() {
        var t = hd[0];
        hd[0] = hd[1];
        hd[1] = t;
    }
    function ir(t, e, n, i, r, a, o, s, l, h) {
        if ((h > e && h > i && h > a && h > s) || (e > h && i > h && a > h && s > h)) {
            return 0;
        }
        var u = Ri(e, i, a, s, h, ld);
        if (0 === u) {
            return 0;
        }
        for (d = 0, p = -1, g = 0, void 0; u > g; g++) {
            var c;
            var f;
            var d;
            var p;
            var g;
            var v = ld[g];
            var m = 0 === v || 1 === v ? 0.5 : 1;
            var y = Oi(t, n, r, o, v);
            l > y ||
                (0 > p && ((p = Bi(e, i, a, s, hd)), hd[1] < hd[0] && p > 1 && nr(), (c = Oi(e, i, a, s, hd[0])), p > 1 && (f = Oi(e, i, a, s, hd[1]))),
                (d += 2 == p ? (v < hd[0] ? (e > c ? m : -m) : v < hd[1] ? (c > f ? m : -m) : f > s ? m : -m) : v < hd[0] ? (e > c ? m : -m) : c > s ? m : -m));
        }
        return d;
    }
    function rr(t, e, n, i, r, a, o, s) {
        if ((s > e && s > i && s > a) || (e > s && i > s && a > s)) {
            return 0;
        }
        var l = Wi(e, i, a, s, ld);
        if (0 === l) {
            return 0;
        }
        var h = Hi(e, i, a);
        if (h >= 0 && 1 >= h) {
            for (u = 0, c = Fi(e, i, a, h), f = 0, void 0; l > f; f++) {
                var u;
                var c;
                var f;
                var d = 0 === ld[f] || 1 === ld[f] ? 0.5 : 1;
                var p = Fi(t, n, r, ld[f]);
                o > p || (u += ld[f] < h ? (e > c ? d : -d) : c > a ? d : -d);
            }
            return u;
        }
        var d = 0 === ld[0] || 1 === ld[0] ? 0.5 : 1;
        var p = Fi(t, n, r, ld[0]);
        return o > p ? 0 : e > a ? d : -d;
    }
    function ar(t, e, n, i, r, a, o, s) {
        s -= e;
        if (s > n || -n > s) {
            return 0;
        }
        var l = Math.sqrt(n * n - s * s);
        ld[0] = -l;
        ld[1] = l;
        var h = Math.abs(i - r);
        if (0.0001 > h) {
            return 0;
        }
        if (0.0001 > h % od) {
            i = 0;
            r = od;
            var u = a ? 1 : -1;
            return o >= ld[0] + t && o <= ld[1] + t ? u : 0;
        }
        if (a) {
            var l = i;
            i = Qi(r);
            r = Qi(l);
        } else {
            i = Qi(i);
            r = Qi(r);
        }
        if (i > r) {
            r += od;
        }
        for (c = 0, f = 0, void 0; 2 > f; f++) {
            var c;
            var f;
            var d = ld[f];
            if (d + t > o) {
                var p = Math.atan2(s, d);
                var u = a ? 1 : -1;
                if (0 > p) {
                    p = od + p;
                }
                if ((p >= i && r >= p) || (p + od >= i && r >= p + od)) {
                    if (p > Math.PI / 2 && p < 1.5 * Math.PI) {
                        u = -u;
                    }
                    c += u;
                }
            }
        }
        return c;
    }
    function or(t, e, n, i, r) {
        for (a = 0, o = 0, s = 0, l = 0, h = 0, u = 0, void 0; u < t.length; ) {
            var a;
            var o;
            var s;
            var l;
            var h;
            var u;
            var c = t[u++];
            switch ((c === ad.M && u > 1 && (n || (a += tr(o, s, l, h, i, r))), 1 == u && ((o = t[u]), (s = t[u + 1]), (l = o), (h = s)), c)) {
                case ad.M:
                    l = t[u++];
                    h = t[u++];
                    o = l;
                    s = h;
                    break;
                case ad.L:
                    if (n) {
                        if (Zi(o, s, t[u], t[u + 1], e, i, r)) {
                            return true;
                        }
                    } else {
                        a += tr(o, s, t[u], t[u + 1], i, r) || 0;
                    }
                    o = t[u++];
                    s = t[u++];
                    break;
                case ad.C:
                    if (n) {
                        if ($i(o, s, t[u++], t[u++], t[u++], t[u++], t[u], t[u + 1], e, i, r)) {
                            return true;
                        }
                    } else {
                        a += ir(o, s, t[u++], t[u++], t[u++], t[u++], t[u], t[u + 1], i, r) || 0;
                    }
                    o = t[u++];
                    s = t[u++];
                    break;
                case ad.Q:
                    if (n) {
                        if (Ki(o, s, t[u++], t[u++], t[u], t[u + 1], e, i, r)) {
                            return true;
                        }
                    } else {
                        a += rr(o, s, t[u++], t[u++], t[u], t[u + 1], i, r) || 0;
                    }
                    o = t[u++];
                    s = t[u++];
                    break;
                case ad.A:
                    var f = t[u++];
                    var d = t[u++];
                    var p = t[u++];
                    var g = t[u++];
                    var v = t[u++];
                    var m = t[u++];
                    var y = (t[u++], 1 - t[u++]);
                    var _ = Math.cos(v) * p + f;
                    var x = Math.sin(v) * g + d;
                    u > 1 ? (a += tr(o, s, _, x, i, r)) : ((l = _), (h = x));
                    var w = ((i - f) * g) / p + f;
                    if (n) {
                        if (Ji(f, d, g, v, v + m, y, e, w, r)) {
                            return true;
                        }
                    } else {
                        a += ar(f, d, g, v, v + m, y, w, r);
                    }
                    o = Math.cos(v + m) * p + f;
                    s = Math.sin(v + m) * g + d;
                    break;
                case ad.R:
                    l = o = t[u++];
                    h = s = t[u++];
                    var b = t[u++];
                    var M = t[u++];
                    var _ = l + b;
                    var x = h + M;
                    if (n) {
                        if (Zi(l, h, _, h, e, i, r) || Zi(_, h, _, x, e, i, r) || Zi(_, x, l, x, e, i, r) || Zi(l, x, l, h, e, i, r)) {
                            return true;
                        }
                    } else {
                        a += tr(_, h, _, x, i, r);
                        a += tr(l, x, l, h, i, r);
                    }
                    break;
                case ad.Z:
                    if (n) {
                        if (Zi(o, s, l, h, e, i, r)) {
                            return true;
                        }
                    } else {
                        a += tr(o, s, l, h, i, r);
                    }
                    o = l;
                    s = h;
            }
        }
        n || er(s, h) || (a += tr(o, s, l, h, i, r) || 0);
        return 0 !== a;
    }
    function sr(t, e, n) {
        return or(t, 0, false, e, n);
    }
    function lr(t, e, n, i) {
        return or(t, e, true, n, i);
    }
    function hr(t) {
        Wn.call(this, t);
        this.path = null;
    }
    function ur(t, e, n, i, r, a, o, s, l, h, u) {
        var c = l * (bd / 180);
        var f = (wd(c) * (t - n)) / 2 + (xd(c) * (e - i)) / 2;
        var d = (-1 * xd(c) * (t - n)) / 2 + (wd(c) * (e - i)) / 2;
        var p = (f * f) / (o * o) + (d * d) / (s * s);
        if (p > 1) {
            o *= _d(p);
            s *= _d(p);
        }
        var g = (r === a ? -1 : 1) * _d((o * o * s * s - o * o * d * d - s * s * f * f) / (o * o * d * d + s * s * f * f)) || 0;
        var v = (g * o * d) / s;
        var m = (g * -s * f) / o;
        var y = (t + n) / 2 + wd(c) * v - xd(c) * m;
        var _ = (e + i) / 2 + xd(c) * v + wd(c) * m;
        var x = Cd([1, 0], [(f - v) / o, (d - m) / s]);
        var w = [(f - v) / o, (d - m) / s];
        var b = [(-1 * f - v) / o, (-1 * d - m) / s];
        var M = Cd(w, b);
        if (Sd(w, b) <= -1) {
            M = bd;
        }
        if (Sd(w, b) >= 1) {
            M = 0;
        }
        if (0 === a && M > 0) {
            M -= 2 * bd;
        }
        if (1 === a && 0 > M) {
            M += 2 * bd;
        }
        u.addData(h, y, _, o, s, x, M, c, a);
    }
    function cr(t) {
        if (!t) {
            return [];
        }
        var e;
        var n = t.replace(/-/g, ' -').replace(/  /g, ' ').replace(/ /g, ',').replace(/,,/g, ',');
        for (e = 0; e < yd.length; e++) {
            n = n.replace(new RegExp(yd[e], 'g'), '|' + yd[e]);
        }
        var i;
        var r = n.split('|');
        var a = 0;
        var o = 0;
        var s = new nd();
        var l = nd.CMD;
        for (e = 1; e < r.length; e++) {
            var h;
            var u = r[e];
            var c = u.charAt(0);
            var f = 0;
            var d = u.slice(1).replace(/e,-/g, 'e-').split(',');
            if (d.length > 0 && '' === d[0]) {
                d.shift();
            }
            for (var p = 0; p < d.length; p++) {
                d[p] = parseFloat(d[p]);
            }
            for (; f < d.length && !isNaN(d[f]) && !isNaN(d[0]); ) {
                var g;
                var v;
                var m;
                var y;
                var _;
                var x;
                var w;
                var b = a;
                var M = o;
                switch (c) {
                    case 'l':
                        a += d[f++];
                        o += d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'L':
                        a = d[f++];
                        o = d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'm':
                        a += d[f++];
                        o += d[f++];
                        h = l.M;
                        s.addData(h, a, o);
                        c = 'l';
                        break;
                    case 'M':
                        a = d[f++];
                        o = d[f++];
                        h = l.M;
                        s.addData(h, a, o);
                        c = 'L';
                        break;
                    case 'h':
                        a += d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'H':
                        a = d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'v':
                        o += d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'V':
                        o = d[f++];
                        h = l.L;
                        s.addData(h, a, o);
                        break;
                    case 'C':
                        h = l.C;
                        s.addData(h, d[f++], d[f++], d[f++], d[f++], d[f++], d[f++]);
                        a = d[f - 2];
                        o = d[f - 1];
                        break;
                    case 'c':
                        h = l.C;
                        s.addData(h, d[f++] + a, d[f++] + o, d[f++] + a, d[f++] + o, d[f++] + a, d[f++] + o);
                        a += d[f - 2];
                        o += d[f - 1];
                        break;
                    case 'S':
                        g = a;
                        v = o;
                        var S = s.len();
                        var C = s.data;
                        if (i === l.C) {
                            g += a - C[S - 4];
                            v += o - C[S - 3];
                        }
                        h = l.C;
                        b = d[f++];
                        M = d[f++];
                        a = d[f++];
                        o = d[f++];
                        s.addData(h, g, v, b, M, a, o);
                        break;
                    case 's':
                        g = a;
                        v = o;
                        var S = s.len();
                        var C = s.data;
                        if (i === l.C) {
                            g += a - C[S - 4];
                            v += o - C[S - 3];
                        }
                        h = l.C;
                        b = a + d[f++];
                        M = o + d[f++];
                        a += d[f++];
                        o += d[f++];
                        s.addData(h, g, v, b, M, a, o);
                        break;
                    case 'Q':
                        b = d[f++];
                        M = d[f++];
                        a = d[f++];
                        o = d[f++];
                        h = l.Q;
                        s.addData(h, b, M, a, o);
                        break;
                    case 'q':
                        b = d[f++] + a;
                        M = d[f++] + o;
                        a += d[f++];
                        o += d[f++];
                        h = l.Q;
                        s.addData(h, b, M, a, o);
                        break;
                    case 'T':
                        g = a;
                        v = o;
                        var S = s.len();
                        var C = s.data;
                        if (i === l.Q) {
                            g += a - C[S - 4];
                            v += o - C[S - 3];
                        }
                        a = d[f++];
                        o = d[f++];
                        h = l.Q;
                        s.addData(h, g, v, a, o);
                        break;
                    case 't':
                        g = a;
                        v = o;
                        var S = s.len();
                        var C = s.data;
                        if (i === l.Q) {
                            g += a - C[S - 4];
                            v += o - C[S - 3];
                        }
                        a += d[f++];
                        o += d[f++];
                        h = l.Q;
                        s.addData(h, g, v, a, o);
                        break;
                    case 'A':
                        m = d[f++];
                        y = d[f++];
                        _ = d[f++];
                        x = d[f++];
                        w = d[f++];
                        b = a;
                        M = o;
                        a = d[f++];
                        o = d[f++];
                        h = l.A;
                        ur(b, M, a, o, x, w, m, y, _, h, s);
                        break;
                    case 'a':
                        m = d[f++];
                        y = d[f++];
                        _ = d[f++];
                        x = d[f++];
                        w = d[f++];
                        b = a;
                        M = o;
                        a += d[f++];
                        o += d[f++];
                        h = l.A;
                        ur(b, M, a, o, x, w, m, y, _, h, s);
                }
            }
            if ('z' === c || 'Z' === c) {
                h = l.Z;
                s.addData(h);
            }
            i = h;
        }
        s.toStatic();
        return s;
    }
    function fr(t, e) {
        var n = cr(t);
        e = e || {};
        e.buildPath = function (t) {
            if (t.setData) {
                t.setData(n.data);
                var e = t.getContext();
                if (e) {
                    t.rebuildPath(e);
                }
            } else {
                var e = t;
                n.rebuildPath(e);
            }
        };
        e.applyTransform = function (t) {
            md(n, t);
            this.dirty(true);
        };
        return e;
    }
    function dr(t, e) {
        return new hr(fr(t, e));
    }
    function pr(t, e, n, i, r, a, o) {
        var s = 0.5 * (n - t);
        var l = 0.5 * (i - e);
        return (2 * (e - n) + s + l) * o + (-3 * (e - n) - 2 * s - l) * a + s * r + e;
    }
    function gr(t, e, n) {
        var i = e.points;
        var r = e.smooth;
        if (i && i.length >= 2) {
            if (r && 'spline' !== r) {
                var a = Pd(i, r, n, e.smoothConstraint);
                t.moveTo(i[0][0], i[0][1]);
                for (o = i.length, s = 0, void 0; (n ? o : o - 1) > s; s++) {
                    var o;
                    var s;
                    var l = a[2 * s];
                    var h = a[2 * s + 1];
                    var u = i[(s + 1) % o];
                    t.bezierCurveTo(l[0], l[1], h[0], h[1], u[0], u[1]);
                }
            } else {
                if ('spline' === r) {
                    i = Ld(i, n);
                }
                t.moveTo(i[0][0], i[0][1]);
                for (s = 1, c = i.length, void 0; c > s; s++) {
                    var s;
                    var c;
                    t.lineTo(i[s][0], i[s][1]);
                }
            }
            if (n) {
                t.closePath();
            }
        }
    }
    function vr(t, e, n) {
        var i = t.cpx2;
        var r = t.cpy2;
        return null === i || null === r
            ? [(n ? Ei : Oi)(t.x1, t.cpx1, t.cpx2, t.x2, e), (n ? Ei : Oi)(t.y1, t.cpy1, t.cpy2, t.y2, e)]
            : [(n ? Vi : Fi)(t.x1, t.cpx1, t.x2, e), (n ? Vi : Fi)(t.y1, t.cpy1, t.y2, e)];
    }
    function mr(t) {
        Wn.call(this, t);
        this._displayables = [];
        this._temporaryDisplayables = [];
        this._cursor = 0;
        this.notClear = true;
    }
    function yr(t) {
        return hr.extend(t);
    }
    function _r(t, e, n, i) {
        var r = dr(t, e);
        var a = r.getBoundingRect();
        if (n) {
            if ('center' === i) {
                n = wr(n, a);
            }
            br(r, n);
        }
        return r;
    }
    function xr(t, e, n) {
        var i = new Hn({
            style: {
                image: t,
                x: e.x,
                y: e.y,
                width: e.width,
                height: e.height
            },
            onload: function (t) {
                if ('center' === n) {
                    var r = {
                        width: t.width,
                        height: t.height
                    };
                    i.setStyle(wr(e, r));
                }
            }
        });
        return i;
    }
    function wr(t, e) {
        var n;
        var i = e.width / e.height;
        var r = t.height * i;
        r <= t.width ? (n = t.height) : ((r = t.width), (n = r / i));
        var a = t.x + t.width / 2;
        var o = t.y + t.height / 2;
        return {
            x: a - r / 2,
            y: o - n / 2,
            width: r,
            height: n
        };
    }
    function br(t, e) {
        if (t.applyTransform) {
            var n = t.getBoundingRect();
            var i = n.calculateTransform(e);
            t.applyTransform(i);
        }
    }
    function Mr(t) {
        var e = t.shape;
        var n = t.style.lineWidth;
        if (Wd(2 * e.x1) === Wd(2 * e.x2)) {
            e.x1 = e.x2 = Sr(e.x1, n, true);
        }
        if (Wd(2 * e.y1) === Wd(2 * e.y2)) {
            e.y1 = e.y2 = Sr(e.y1, n, true);
        }
        return t;
    }
    function Sr(t, e, n) {
        var i = Wd(2 * t);
        return (i + Wd(e)) % 2 === 0 ? i / 2 : (i + (n ? 1 : -1)) / 2;
    }
    function Cr(t) {
        return null != t && 'none' != t;
    }
    function Tr(t) {
        return 'string' == typeof t ? Ce(t, -0.1) : t;
    }
    function kr(t) {
        if (t.__hoverStlDirty) {
            var e = t.style.stroke;
            var n = t.style.fill;
            var i = t.__hoverStl;
            i.fill = i.fill || (Cr(n) ? Tr(n) : null);
            i.stroke = i.stroke || (Cr(e) ? Tr(e) : null);
            var r = {};
            for (var a in i) {
                if (null != i[a]) {
                    r[a] = t.style[a];
                }
            }
            t.__normalStl = r;
            t.__hoverStlDirty = false;
        }
    }
    function Dr(t) {
        if (!t.__isHover) {
            kr(t);
            if (t.useHoverLayer) {
                if (t.__zr) {
                    t.__zr.addHover(t, t.__hoverStl);
                }
            } else {
                var e = t.style;
                var n = e.insideRollbackOpt;
                if (n) {
                    Xr(e);
                }
                e.extendFrom(t.__hoverStl);
                if (n) {
                    qr(e, e.insideOriginalTextPosition, n);
                    if (null == e.textFill) {
                        e.textFill = n.autoColor;
                    }
                }
                t.dirty(false);
                t.z2 += 1;
            }
            t.__isHover = true;
        }
    }
    function Ir(t) {
        if (t.__isHover) {
            var e = t.__normalStl;
            t.useHoverLayer ? t.__zr && t.__zr.removeHover(t) : (e && t.setStyle(e), (t.z2 -= 1));
            t.__isHover = false;
        }
    }
    function Ar(t) {
        'group' === t.type
            ? t.traverse(function (t) {
                  if ('group' !== t.type) {
                      Dr(t);
                  }
              })
            : Dr(t);
    }
    function Lr(t) {
        'group' === t.type
            ? t.traverse(function (t) {
                  if ('group' !== t.type) {
                      Ir(t);
                  }
              })
            : Ir(t);
    }
    function Pr(t, e) {
        t.__hoverStl = t.hoverStyle || e || {};
        t.__hoverStlDirty = true;
        if (t.__isHover) {
            kr(t);
        }
    }
    function Or(t) {
        (this.__hoverSilentOnTouch && t.zrByTouch) || (!this.__isEmphasis && Ar(this));
    }
    function Er(t) {
        (this.__hoverSilentOnTouch && t.zrByTouch) || (!this.__isEmphasis && Lr(this));
    }
    function Rr() {
        this.__isEmphasis = true;
        Ar(this);
    }
    function Br() {
        this.__isEmphasis = false;
        Lr(this);
    }
    function zr(t, e, n) {
        t.__hoverSilentOnTouch = n && n.hoverSilentOnTouch;
        'group' === t.type
            ? t.traverse(function (t) {
                  if ('group' !== t.type) {
                      Pr(t, e);
                  }
              })
            : Pr(t, e);
        t.on('mouseover', Or).on('mouseout', Er);
        t.on('emphasis', Rr).on('normal', Br);
    }
    function Nr(t, e, n, i, r, a, o) {
        r = r || Hd;
        var s;
        var l = r.labelFetcher;
        var h = r.labelDataIndex;
        var u = r.labelDimIndex;
        var c = n.getShallow('show');
        var f = i.getShallow('show');
        if (c || f) {
            if (l) {
                s = l.getFormattedLabel(h, 'normal', null, u);
            }
            if (null == s) {
                s = x(r.defaultText) ? r.defaultText(h, r) : r.defaultText;
            }
        }
        var d = c ? s : null;
        var p = f ? D(l ? l.getFormattedLabel(h, 'emphasis', null, u) : null, s) : null;
        if (null != d || null != p) {
            Fr(t, n, a, r);
            Fr(e, i, o, r, true);
        }
        t.text = d;
        e.text = p;
    }
    function Fr(t, e, n, i, r) {
        Vr(t, e, i, r);
        if (n) {
            o(t, n);
        }
        if (t.host && t.host.dirty) {
            t.host.dirty(false);
        }
        return t;
    }
    function Vr(t, e, n, i) {
        n = n || Hd;
        if (n.isRectText) {
            var r = e.getShallow('position') || (i ? null : 'inside');
            if ('outside' === r) {
                r = 'top';
            }
            t.textPosition = r;
            t.textOffset = e.getShallow('offset');
            var a = e.getShallow('rotate');
            if (null != a) {
                a *= Math.PI / 180;
            }
            t.textRotation = a;
            t.textDistance = D(e.getShallow('distance'), i ? null : 5);
        }
        var o;
        var s = e.ecModel;
        var l = s && s.option.textStyle;
        var h = Wr(e);
        if (h) {
            o = {};
            for (var u in h) {
                if (h.hasOwnProperty(u)) {
                    var c = e.getModel(['rich', u]);
                    Hr((o[u] = {}), c, l, n, i);
                }
            }
        }
        t.rich = o;
        Hr(t, e, l, n, i, true);
        if (n.forceRich && !n.textStyle) {
            n.textStyle = {};
        }
        return t;
    }
    function Wr(t) {
        for (var e; t && t !== t.ecModel; ) {
            var n = (t.option || Hd).rich;
            if (n) {
                e = e || {};
                for (var i in n) {
                    if (n.hasOwnProperty(i)) {
                        e[i] = 1;
                    }
                }
            }
            t = t.parentModel;
        }
        return e;
    }
    function Hr(t, e, n, i, r, a) {
        n = (!r && n) || Hd;
        t.textFill = Gr(e.getShallow('color'), i) || n.color;
        t.textStroke = Gr(e.getShallow('textBorderColor'), i) || n.textBorderColor;
        t.textStrokeWidth = D(e.getShallow('textBorderWidth'), n.textBorderWidth);
        if (!r) {
            if (a) {
                var o = t.textPosition;
                t.insideRollback = qr(t, o, i);
                t.insideOriginalTextPosition = o;
                t.insideRollbackOpt = i;
            }
            if (null == t.textFill) {
                t.textFill = i.autoColor;
            }
        }
        t.fontStyle = e.getShallow('fontStyle') || n.fontStyle;
        t.fontWeight = e.getShallow('fontWeight') || n.fontWeight;
        t.fontSize = e.getShallow('fontSize') || n.fontSize;
        t.fontFamily = e.getShallow('fontFamily') || n.fontFamily;
        t.textAlign = e.getShallow('align');
        t.textVerticalAlign = e.getShallow('verticalAlign') || e.getShallow('baseline');
        t.textLineHeight = e.getShallow('lineHeight');
        t.textWidth = e.getShallow('width');
        t.textHeight = e.getShallow('height');
        t.textTag = e.getShallow('tag');
        (a && i.disableBox) ||
            ((t.textBackgroundColor = Gr(e.getShallow('backgroundColor'), i)),
            (t.textPadding = e.getShallow('padding')),
            (t.textBorderColor = Gr(e.getShallow('borderColor'), i)),
            (t.textBorderWidth = e.getShallow('borderWidth')),
            (t.textBorderRadius = e.getShallow('borderRadius')),
            (t.textBoxShadowColor = e.getShallow('shadowColor')),
            (t.textBoxShadowBlur = e.getShallow('shadowBlur')),
            (t.textBoxShadowOffsetX = e.getShallow('shadowOffsetX')),
            (t.textBoxShadowOffsetY = e.getShallow('shadowOffsetY')));
        t.textShadowColor = e.getShallow('textShadowColor') || n.textShadowColor;
        t.textShadowBlur = e.getShallow('textShadowBlur') || n.textShadowBlur;
        t.textShadowOffsetX = e.getShallow('textShadowOffsetX') || n.textShadowOffsetX;
        t.textShadowOffsetY = e.getShallow('textShadowOffsetY') || n.textShadowOffsetY;
    }
    function Gr(t, e) {
        return 'auto' !== t ? t : e && e.autoColor ? e.autoColor : null;
    }
    function qr(t, e, n) {
        var i;
        var r = n.useInsideStyle;
        if (null == t.textFill && r !== false && (r === true || (n.isRectText && e && 'string' == typeof e && e.indexOf('inside') >= 0))) {
            i = {
                textFill: null,
                textStroke: t.textStroke,
                textStrokeWidth: t.textStrokeWidth
            };
            t.textFill = '#fff';
            if (null == t.textStroke) {
                (t.textStroke = n.autoColor), null == t.textStrokeWidth && (t.textStrokeWidth = 2);
            }
        }
        return i;
    }
    function Xr(t) {
        var e = t.insideRollback;
        if (e) {
            t.textFill = e.textFill;
            t.textStroke = e.textStroke;
            t.textStrokeWidth = e.textStrokeWidth;
        }
    }
    function Ur(t, e) {
        var n = e || e.getModel('textStyle');
        return O(
            [
                t.fontStyle || (n && n.getShallow('fontStyle')) || '',
                t.fontWeight || (n && n.getShallow('fontWeight')) || '',
                (t.fontSize || (n && n.getShallow('fontSize')) || 12) + 'px',
                t.fontFamily || (n && n.getShallow('fontFamily')) || 'sans-serif'
            ].join(' ')
        );
    }
    function Yr(t, e, n, i, r, a) {
        if ('function' == typeof r) {
            a = r;
            r = null;
        }
        var o = i && i.isAnimationEnabled();
        if (o) {
            var s = t ? 'Update' : '';
            var l = i.getShallow('animationDuration' + s);
            var h = i.getShallow('animationEasing' + s);
            var u = i.getShallow('animationDelay' + s);
            if ('function' == typeof u) {
                u = u(r, i.getAnimationDelayParams ? i.getAnimationDelayParams(e, r) : null);
            }
            if ('function' == typeof l) {
                l = l(r);
            }
            l > 0 ? e.animateTo(n, l, u || 0, h, a, !!a) : (e.stopAnimation(), e.attr(n), a && a());
        } else {
            e.stopAnimation();
            e.attr(n);
            if (a) {
                a();
            }
        }
    }
    function jr(t, e, n, i, r) {
        Yr(true, t, e, n, i, r);
    }
    function Zr(t, e, n, i, r) {
        Yr(false, t, e, n, i, r);
    }
    function $r(t, e, n) {
        function i(t) {
            var e = {};
            t.traverse(function (t) {
                if (!t.isGroup && t.anid) {
                    e[t.anid] = t;
                }
            });
            return e;
        }
        function r(t) {
            var e = {
                position: W(t.position),
                rotation: t.rotation
            };
            if (t.shape) {
                e.shape = o({}, t.shape);
            }
            return e;
        }
        if (t && e) {
            var a = i(t);
            e.traverse(function (t) {
                if (!t.isGroup && t.anid) {
                    var e = a[t.anid];
                    if (e) {
                        var i = r(t);
                        t.attr(r(e));
                        jr(t, i, n, t.dataIndex);
                    }
                }
            });
        }
    }
    function Kr(t, e, n) {
        this.parentModel = e;
        this.ecModel = n;
        this.option = t;
    }
    function Qr(t, e, n) {
        for (var i = 0; i < e.length && (!e[i] || ((t = t && 'object' == typeof t ? t[e[i]] : null), null != t)); i++) {}
        if (null == t && n) {
            t = n.get(e);
        }
        return t;
    }
    function Jr(t, e) {
        var n = jd(t).getParent;
        return n ? n.call(t, e) : t.parentModel;
    }
    function ta(t) {
        return [t || '', Zd++, Math.random().toFixed(5)].join('_');
    }
    function ea(t) {
        var e = {};
        t.registerSubTypeDefaulter = function (t, n) {
            t = Si(t);
            e[t.main] = n;
        };
        t.determineSubType = function (n, i) {
            var r = i.type;
            if (!r) {
                var a = Si(n).main;
                if (t.hasSubTypes(n) && e[a]) {
                    r = e[a](i);
                }
            }
            return r;
        };
        return t;
    }
    function na(t, e) {
        function n(t) {
            var n = {};
            var a = [];
            d(t, function (o) {
                var s = i(n, o);
                var l = (s.originalDeps = e(o));
                var u = r(l, t);
                s.entryCount = u.length;
                if (0 === s.entryCount) {
                    a.push(o);
                }
                d(u, function (t) {
                    if (h(s.predecessor, t) < 0) {
                        s.predecessor.push(t);
                    }
                    var e = i(n, t);
                    if (h(e.successor, t) < 0) {
                        e.successor.push(o);
                    }
                });
            });
            return {
                graph: n,
                noEntryList: a
            };
        }
        function i(t, e) {
            t[e] ||
                (t[e] = {
                    predecessor: [],
                    successor: []
                });
            return t[e];
        }
        function r(t, e) {
            var n = [];
            d(t, function (t) {
                if (h(e, t) >= 0) {
                    n.push(t);
                }
            });
            return n;
        }
        t.topologicalTravel = function (t, e, i, r) {
            function a(t) {
                l[t].entryCount--;
                if (0 === l[t].entryCount) {
                    h.push(t);
                }
            }
            function o(t) {
                u[t] = true;
                a(t);
            }
            if (t.length) {
                var s = n(e);
                var l = s.graph;
                var h = s.noEntryList;
                var u = {};
                for (
                    d(t, function (t) {
                        u[t] = true;
                    });
                    h.length;

                ) {
                    var c = h.pop();
                    var f = l[c];
                    var p = !!u[c];
                    if (p) {
                        i.call(r, c, f.originalDeps.slice());
                        delete u[c];
                    }
                    d(f.successor, p ? o : a);
                }
                d(u, function () {
                    throw new Error('Circle dependency may exists');
                });
            }
        };
    }
    function ia(t) {
        return t.replace(/^\s+/, '').replace(/\s+$/, '');
    }
    function ra(t, e, n, i) {
        var r = e[1] - e[0];
        var a = n[1] - n[0];
        if (0 === r) {
            return 0 === a ? n[0] : (n[0] + n[1]) / 2;
        }
        if (i) {
            if (r > 0) {
                if (t <= e[0]) {
                    return n[0];
                }
                if (t >= e[1]) {
                    return n[1];
                }
            } else {
                if (t >= e[0]) {
                    return n[0];
                }
                if (t <= e[1]) {
                    return n[1];
                }
            }
        } else {
            if (t === e[0]) {
                return n[0];
            }
            if (t === e[1]) {
                return n[1];
            }
        }
        return ((t - e[0]) / r) * a + n[0];
    }
    function aa(t, e) {
        switch (t) {
            case 'center':
            case 'middle':
                t = '50%';
                break;
            case 'left':
            case 'top':
                t = '0%';
                break;
            case 'right':
            case 'bottom':
                t = '100%';
        }
        return 'string' == typeof t ? (ia(t).match(/%$/) ? (parseFloat(t) / 100) * e : parseFloat(t)) : null == t ? 0 / 0 : +t;
    }
    function oa(t, e, n) {
        if (null == e) {
            e = 10;
        }
        e = Math.min(Math.max(0, e), 20);
        t = (+t).toFixed(e);
        return n ? t : +t;
    }
    function sa(t) {
        var e = t.toString();
        var n = e.indexOf('e');
        if (n > 0) {
            var i = +e.slice(n + 1);
            return 0 > i ? -i : 0;
        }
        var r = e.indexOf('.');
        return 0 > r ? 0 : e.length - 1 - r;
    }
    function la(t, e) {
        var n = Math.log;
        var i = Math.LN10;
        var r = Math.floor(n(t[1] - t[0]) / i);
        var a = Math.round(n(Math.abs(e[1] - e[0])) / i);
        var o = Math.min(Math.max(-r + a, 0), 20);
        return isFinite(o) ? o : 20;
    }
    function ha(t) {
        var e = 2 * Math.PI;
        return ((t % e) + e) % e;
    }
    function ua(t) {
        return t > -$d && $d > t;
    }
    function ca(t) {
        if (t instanceof Date) {
            return t;
        }
        if ('string' == typeof t) {
            var e = Kd.exec(t);
            if (!e) {
                return new Date(0 / 0);
            }
            if (e[8]) {
                var n = +e[4] || 0;
                if ('Z' !== e[8].toUpperCase()) {
                    n -= e[8].slice(0, 3);
                }
                return new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, +e[7] || 0));
            }
            return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0);
        }
        return new Date(null == t ? 0 / 0 : Math.round(t));
    }
    function fa(t) {
        return Math.pow(10, da(t));
    }
    function da(t) {
        return Math.floor(Math.log(t) / Math.LN10);
    }
    function pa(t, e) {
        var n;
        var i = da(t);
        var r = Math.pow(10, i);
        var a = t / r;
        n = e ? (1.5 > a ? 1 : 2.5 > a ? 2 : 4 > a ? 3 : 7 > a ? 5 : 10) : 1 > a ? 1 : 2 > a ? 2 : 3 > a ? 3 : 5 > a ? 5 : 10;
        t = n * r;
        return i >= -20 ? +t.toFixed(0 > i ? -i : 0) : t;
    }
    function ga(t) {
        return isNaN(t) ? '-' : ((t = (t + '').split('.')), t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,') + (t.length > 1 ? '.' + t[1] : ''));
    }
    function va(t) {
        return null == t
            ? ''
            : (t + '').replace(Jd, function (t, e) {
                  return tp[e];
              });
    }
    function ma(t, e, n) {
        _(e) || (e = [e]);
        var i = e.length;
        if (!i) {
            return '';
        }
        for (r = e[0].$vars || [], a = 0, void 0; a < r.length; a++) {
            var r;
            var a;
            var o = ep[a];
            t = t.replace(np(o), np(o, 0));
        }
        for (var s = 0; i > s; s++) {
            for (var l = 0; l < r.length; l++) {
                var h = e[s][r[l]];
                t = t.replace(np(ep[l], s), n ? va(h) : h);
            }
        }
        return t;
    }
    function ya(t, e) {
        t = w(t)
            ? {
                  color: t,
                  extraCssText: e
              }
            : t || {};
        var n = t.color;
        var i = t.type;
        var e = t.extraCssText;
        return n
            ? 'subItem' === i
                ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' +
                  va(n) +
                  ';' +
                  (e || '') +
                  '"></span>'
                : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + va(n) + ';' + (e || '') + '"></span>'
            : '';
    }
    function _a(t, e) {
        t += '';
        return '0000'.substr(0, e - t.length) + t;
    }
    function xa(t, e, n) {
        if ('week' === t || 'month' === t || 'quarter' === t || 'half-year' === t || 'year' === t) {
            t = 'MM-dd\nyyyy';
        }
        var i = ca(e);
        var r = n ? 'UTC' : '';
        var a = i['get' + r + 'FullYear']();
        var o = i['get' + r + 'Month']() + 1;
        var s = i['get' + r + 'Date']();
        var l = i['get' + r + 'Hours']();
        var h = i['get' + r + 'Minutes']();
        var u = i['get' + r + 'Seconds']();
        var c = i['get' + r + 'Milliseconds']();
        return (t = t
            .replace('MM', _a(o, 2))
            .replace('M', o)
            .replace('yyyy', a)
            .replace('yy', a % 100)
            .replace('dd', _a(s, 2))
            .replace('d', s)
            .replace('hh', _a(l, 2))
            .replace('h', l)
            .replace('mm', _a(h, 2))
            .replace('m', h)
            .replace('ss', _a(u, 2))
            .replace('s', u)
            .replace('SSS', _a(c, 3)));
    }
    function wa(t, e, n, i, r) {
        var a = 0;
        var o = 0;
        if (null == i) {
            i = 1 / 0;
        }
        if (null == r) {
            r = 1 / 0;
        }
        var s = 0;
        e.eachChild(function (l, h) {
            var u;
            var c;
            var f = l.position;
            var d = l.getBoundingRect();
            var p = e.childAt(h + 1);
            var g = p && p.getBoundingRect();
            if ('horizontal' === t) {
                var v = d.width + (g ? -g.x + d.x : 0);
                u = a + v;
                u > i || l.newline ? ((a = 0), (u = v), (o += s + n), (s = d.height)) : (s = Math.max(s, d.height));
            } else {
                var m = d.height + (g ? -g.y + d.y : 0);
                c = o + m;
                c > r || l.newline ? ((a += s + n), (o = 0), (c = m), (s = d.width)) : (s = Math.max(s, d.width));
            }
            l.newline || ((f[0] = a), (f[1] = o), 'horizontal' === t ? (a = u + n) : (o = c + n));
        });
    }
    function ba(t, e, n) {
        n = Qd(n || 0);
        var i = e.width;
        var r = e.height;
        var a = aa(t.left, i);
        var o = aa(t.top, r);
        var s = aa(t.right, i);
        var l = aa(t.bottom, r);
        var h = aa(t.width, i);
        var u = aa(t.height, r);
        var c = n[2] + n[0];
        var f = n[1] + n[3];
        var d = t.aspect;
        switch (
            (isNaN(h) && (h = i - s - f - a),
            isNaN(u) && (u = r - l - c - o),
            null != d && (isNaN(h) && isNaN(u) && (d > i / r ? (h = 0.8 * i) : (u = 0.8 * r)), isNaN(h) && (h = d * u), isNaN(u) && (u = h / d)),
            isNaN(a) && (a = i - s - h - f),
            isNaN(o) && (o = r - l - u - c),
            t.left || t.right)
        ) {
            case 'center':
                a = i / 2 - h / 2 - n[3];
                break;
            case 'right':
                a = i - h - f;
        }
        switch (t.top || t.bottom) {
            case 'middle':
            case 'center':
                o = r / 2 - u / 2 - n[0];
                break;
            case 'bottom':
                o = r - u - c;
        }
        a = a || 0;
        o = o || 0;
        if (isNaN(h)) {
            h = i - f - a - (s || 0);
        }
        if (isNaN(u)) {
            u = r - c - o - (l || 0);
        }
        var p = new Ve(a + n[3], o + n[0], h, u);
        p.margin = n;
        return p;
    }
    function Ma(t, e, n) {
        function i(n, i) {
            var o = {};
            var l = 0;
            var h = {};
            var u = 0;
            var c = 2;
            rp(n, function (e) {
                h[e] = t[e];
            });
            rp(n, function (t) {
                if (r(e, t)) {
                    o[t] = h[t] = e[t];
                }
                if (a(o, t)) {
                    l++;
                }
                if (a(h, t)) {
                    u++;
                }
            });
            if (s[i]) {
                a(e, n[1]) ? (h[n[2]] = null) : a(e, n[2]) && (h[n[1]] = null);
                return h;
            }
            if (u !== c && l) {
                if (l >= c) {
                    return o;
                }
                for (var f = 0; f < n.length; f++) {
                    var d = n[f];
                    if (!r(o, d) && r(t, d)) {
                        o[d] = t[d];
                        break;
                    }
                }
                return o;
            }
            return h;
        }
        function r(t, e) {
            return t.hasOwnProperty(e);
        }
        function a(t, e) {
            return null != t[e] && 'auto' !== t[e];
        }
        function o(t, e, n) {
            rp(t, function (t) {
                e[t] = n[t];
            });
        }
        if (!b(n)) {
            n = {};
        }
        var s = n.ignoreSize;
        if (!_(s)) {
            s = [s, s];
        }
        var l = i(op[0], 0);
        var h = i(op[1], 1);
        o(op[0], t, l);
        o(op[1], t, h);
    }
    function Sa(t) {
        return Ca({}, t);
    }
    function Ca(t, e) {
        if (e && t) {
            rp(ap, function (n) {
                if (e.hasOwnProperty(n)) {
                    t[n] = e[n];
                }
            });
        }
        return t;
    }
    function Ta(t) {
        var e = [];
        d(hp.getClassesByMainType(t), function (t) {
            e = e.concat(t.prototype.dependencies || []);
        });
        e = p(e, function (t) {
            return Si(t).main;
        });
        if ('dataset' !== t && h(e, 'dataset') <= 0) {
            e.unshift('dataset');
        }
        return e;
    }
    function ka(t, e) {
        for (n = t.length, i = 0, void 0; n > i; i++) {
            var n;
            var i;
            if (t[i].length > e) {
                return t[i];
            }
        }
        return t[n - 1];
    }
    function Da(t) {
        var e = t.get('coordinateSystem');
        var n = {
            coordSysName: e,
            coordSysDims: [],
            axisMap: z(),
            categoryAxisMap: z()
        };
        var i = pp[e];
        return i ? (i(t, n, n.axisMap, n.categoryAxisMap), n) : void 0;
    }
    function Ia(t) {
        return 'category' === t.get('type');
    }
    function Aa(t) {
        this.fromDataset = t.fromDataset;
        this.setData(t.data || (t.sourceFormat === yp ? {} : []));
        this.sourceFormat = t.sourceFormat || _p;
        this.seriesLayoutBy = t.seriesLayoutBy || wp;
        this.dimensionsDefine = t.dimensionsDefine;
        this.encodeDefine = t.encodeDefine && z(t.encodeDefine);
        this.startIndex = t.startIndex || 0;
        this.dimensionsDetectCount = t.dimensionsDetectCount;
    }
    function La(t) {
        var e = t.option.source;
        var n = _p;
        if (S(e)) n = xp;
        else if (_(e))
            for (i = 0, r = e.length, void 0; r > i; i++) {
                var i;
                var r;
                var a = e[i];
                if (null != a) {
                    if (_(a)) {
                        n = vp;
                        break;
                    }
                    if (b(a)) {
                        n = mp;
                        break;
                    }
                }
            }
        else if (b(e)) {
            for (var o in e) {
                if (e.hasOwnProperty(o) && f(e[o])) {
                    n = yp;
                    break;
                }
            }
        } else if (null != e) {
            throw new Error('Invalid data');
        }
        Mp(t).sourceFormat = n;
    }
    function Pa(t) {
        return Mp(t).source;
    }
    function Oa(t) {
        Mp(t).datasetMap = z();
    }
    function Ea(t) {
        var e = t.option;
        var n = e.data;
        var i = S(n) ? xp : gp;
        var r = false;
        var a = e.seriesLayoutBy;
        var o = e.sourceHeader;
        var s = e.dimensions;
        var l = Va(t);
        if (l) {
            var h = l.option;
            n = h.source;
            i = Mp(l).sourceFormat;
            r = true;
            a = a || h.seriesLayoutBy;
            if (null == o) {
                o = h.sourceHeader;
            }
            s = s || h.dimensions;
        }
        var u = Ra(n, i, a, o, s);
        var c = e.encode;
        if (!c && l) {
            c = Fa(t, l, n, i, a, u);
        }
        Mp(t).source = new Aa({
            data: n,
            fromDataset: r,
            seriesLayoutBy: a,
            sourceFormat: i,
            dimensionsDefine: u.dimensionsDefine,
            startIndex: u.startIndex,
            dimensionsDetectCount: u.dimensionsDetectCount,
            encodeDefine: c
        });
    }
    function Ra(t, e, n, i, r) {
        if (!t) {
            return {
                dimensionsDefine: Ba(r)
            };
        }
        var a;
        var o;
        var s;
        if (e === vp) {
            'auto' === i || null == i
                ? za(
                      function (t) {
                          if (null != t && '-' !== t) {
                              w(t) ? null == o && (o = 1) : (o = 0);
                          }
                      },
                      n,
                      t,
                      10
                  )
                : (o = i ? 1 : 0);
            r ||
                1 !== o ||
                ((r = []),
                za(
                    function (t, e) {
                        r[e] = null != t ? t : '';
                    },
                    n,
                    t
                ));
            a = r ? r.length : n === bp ? t.length : t[0] ? t[0].length : null;
        } else if (e === mp) r || ((r = Na(t)), (s = true));
        else if (e === yp)
            r ||
                ((r = []),
                (s = true),
                d(t, function (t, e) {
                    r.push(e);
                }));
        else if (e === gp) {
            var l = fi(t[0]);
            a = (_(l) && l.length) || 1;
        }
        var h;
        if (s) {
            d(r, function (t, e) {
                if ('name' === (b(t) ? t.name : t)) {
                    h = e;
                }
            });
        }
        return {
            startIndex: o,
            dimensionsDefine: Ba(r),
            dimensionsDetectCount: a,
            potentialNameDimIndex: h
        };
    }
    function Ba(t) {
        if (t) {
            var e = z();
            return p(t, function (t) {
                t = o(
                    {},
                    b(t)
                        ? t
                        : {
                              name: t
                          }
                );
                if (null == t.name) {
                    return t;
                }
                t.name += '';
                if (null == t.displayName) {
                    t.displayName = t.name;
                }
                var n = e.get(t.name);
                n
                    ? (t.name += '-' + n.count++)
                    : e.set(t.name, {
                          count: 1
                      });
                return t;
            });
        }
    }
    function za(t, e, n, i) {
        if (null == i) {
            i = 1 / 0;
        }
        if (e === bp) {
            for (var r = 0; r < n.length && i > r; r++) {
                t(n[r] ? n[r][0] : null, r);
            }
        } else {
            for (a = n[0] || [], r = 0, void 0; r < a.length && i > r; r++) {
                var a;
                var r;
                t(a[r], r);
            }
        }
    }
    function Na(t) {
        for (n = 0, void 0; n < t.length && !(e = t[n++]); ) {
            var e;
            var n;
        }
        if (e) {
            var i = [];
            d(e, function (t, e) {
                i.push(e);
            });
            return i;
        }
    }
    function Fa(t, e, n, i, r, a) {
        var o = Da(t);
        var s = {};
        var l = [];
        var h = [];
        var u = t.subType;
        var c = z(['pie', 'map', 'funnel']);
        var f = z(['line', 'bar', 'pictorialBar', 'scatter', 'effectScatter', 'candlestick', 'boxplot']);
        if (o && null != f.get(u)) {
            var p = t.ecModel;
            var g = Mp(p).datasetMap;
            var v = e.uid + '_' + r;
            var m =
                g.get(v) ||
                g.set(v, {
                    categoryWayDim: 1,
                    valueWayDim: 0
                });
            d(o.coordSysDims, function (t) {
                if (null == o.firstCategoryDimIndex) {
                    var e = m.valueWayDim++;
                    s[t] = e;
                    h.push(e);
                } else if (o.categoryAxisMap.get(t)) {
                    s[t] = 0;
                    l.push(0);
                } else {
                    var e = m.categoryWayDim++;
                    s[t] = e;
                    h.push(e);
                }
            });
        } else if (null != c.get(u)) {
            for (_ = 0, void 0; 5 > _ && null == y; _++) {
                var y;
                var _;
                Ha(n, i, r, a.dimensionsDefine, a.startIndex, _) || (y = _);
            }
            if (null != y) {
                s.value = y;
                var x = a.potentialNameDimIndex || Math.max(y - 1, 0);
                h.push(x);
                l.push(x);
            }
        }
        if (l.length) {
            s.itemName = l;
        }
        if (h.length) {
            s.seriesName = h;
        }
        return s;
    }
    function Va(t) {
        var e = t.option;
        var n = e.data;
        return n ? void 0 : t.ecModel.getComponent('dataset', e.datasetIndex || 0);
    }
    function Wa(t, e) {
        return Ha(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
    }
    function Ha(t, e, n, i, r, a) {
        function o(t) {
            return null != t && isFinite(t) && '' !== t ? false : w(t) && '-' !== t ? true : void 0;
        }
        var s;
        var l = 5;
        if (S(t)) {
            return false;
        }
        var h;
        if (i) {
            h = i[a];
            h = b(h) ? h.name : h;
        }
        if (e === vp) {
            if (n === bp) {
                for (u = t[a], c = 0, void 0; c < (u || []).length && l > c; c++) {
                    var u;
                    var c;
                    if (null != (s = o(u[r + c]))) {
                        return s;
                    }
                }
            } else {
                for (var c = 0; c < t.length && l > c; c++) {
                    var f = t[r + c];
                    if (f && null != (s = o(f[a]))) {
                        return s;
                    }
                }
            }
        } else if (e === mp) {
            if (!h) {
                return;
            }
            for (var c = 0; c < t.length && l > c; c++) {
                var d = t[c];
                if (d && null != (s = o(d[h]))) {
                    return s;
                }
            }
        } else if (e === yp) {
            if (!h) {
                return;
            }
            var u = t[h];
            if (!u || S(u)) {
                return false;
            }
            for (var c = 0; c < u.length && l > c; c++) {
                if (null != (s = o(u[c]))) {
                    return s;
                }
            }
        } else if (e === gp) {
            for (var c = 0; c < t.length && l > c; c++) {
                var d = t[c];
                var p = fi(d);
                if (!_(p)) {
                    return false;
                }
                if (null != (s = o(p[a]))) {
                    return s;
                }
            }
        }
        return false;
    }
    function Ga(t, e) {
        if (e) {
            var n = e.seiresIndex;
            var i = e.seriesId;
            var r = e.seriesName;
            return (null != n && t.componentIndex !== n) || (null != i && t.id !== i) || (null != r && t.name !== r);
        }
    }
    function qa(t, e) {
        var n = t.color && !t.colorLayer;
        d(e, function (e, a) {
            ('colorLayer' === a && n) || hp.hasClass(a) || ('object' == typeof e ? (t[a] = t[a] ? r(t[a], e, false) : i(e)) : null == t[a] && (t[a] = e));
        });
    }
    function Xa(t) {
        t = t;
        this.option = {};
        this.option[Sp] = 1;
        this._componentsMap = z({
            series: []
        });
        this._seriesIndices;
        this._seriesIndicesMap;
        qa(t, this._theme.option);
        r(t, cp, false);
        this.mergeOption(t);
    }
    function Ua(t, e) {
        _(e) || (e = e ? [e] : []);
        var n = {};
        d(e, function (e) {
            n[e] = (t.get(e) || []).slice();
        });
        return n;
    }
    function Ya(t, e, n) {
        var i = e.type ? e.type : n ? n.subType : hp.determineSubType(t, e);
        return i;
    }
    function ja(t, e) {
        t._seriesIndicesMap = z(
            (t._seriesIndices =
                p(e, function (t) {
                    return t.componentIndex;
                }) || [])
        );
    }
    function Za(t, e) {
        return e.hasOwnProperty('subType')
            ? v(t, function (t) {
                  return t.subType === e.subType;
              })
            : t;
    }
    function $a(t) {
        d(
            Tp,
            function (e) {
                this[e] = m(t[e], t);
            },
            this
        );
    }
    function Ka() {
        this._coordinateSystems = [];
    }
    function Qa(t) {
        this._api = t;
        this._timelineOptions = [];
        this._mediaList = [];
        this._mediaDefault;
        this._currentMediaIndices = [];
        this._optionBackup;
        this._newBaseOption;
    }
    function Ja(t, e, n) {
        var i;
        var r;
        var a = [];
        var o = [];
        var s = t.timeline;
        if (t.baseOption) {
            r = t.baseOption;
        }
        if (s || t.options) {
            r = r || {};
            a = (t.options || []).slice();
        }
        if (t.media) {
            r = r || {};
            var l = t.media;
            Dp(l, function (t) {
                if (t && t.option) {
                    t.query ? o.push(t) : i || (i = t);
                }
            });
        }
        r || (r = t);
        r.timeline || (r.timeline = s);
        Dp(
            [r].concat(a).concat(
                p(o, function (t) {
                    return t.option;
                })
            ),
            function (t) {
                Dp(e, function (e) {
                    e(t, n);
                });
            }
        );
        return {
            baseOption: r,
            timelineOptions: a,
            mediaDefault: i,
            mediaList: o
        };
    }
    function to(t, e, n) {
        var i = {
            width: e,
            height: n,
            aspectratio: e / n
        };
        var r = true;
        d(t, function (t, e) {
            var n = e.match(Pp);
            if (n && n[1] && n[2]) {
                var a = n[1];
                var o = n[2].toLowerCase();
                eo(i[o], t, a) || (r = false);
            }
        });
        return r;
    }
    function eo(t, e, n) {
        return 'min' === n ? t >= e : 'max' === n ? e >= t : t === e;
    }
    function no(t, e) {
        return t.join(',') === e.join(',');
    }
    function io(t, e) {
        e = e || {};
        Dp(e, function (e, n) {
            if (null != e) {
                var i = t[n];
                if (hp.hasClass(n)) {
                    e = ui(e);
                    i = ui(i);
                    var r = pi(i, e);
                    t[n] = Ap(r, function (t) {
                        return t.option && t.exist ? Lp(t.exist, t.option, true) : t.exist || t.option;
                    });
                } else {
                    t[n] = Lp(i, e, true);
                }
            }
        });
    }
    function ro(t) {
        var e = t && t.itemStyle;
        if (e) {
            for (n = 0, i = Rp.length, void 0; i > n; n++) {
                var n;
                var i;
                var a = Rp[n];
                var o = e.normal;
                var s = e.emphasis;
                if (o && o[a]) {
                    t[a] = t[a] || {};
                    t[a].normal ? r(t[a].normal, o[a]) : (t[a].normal = o[a]);
                    o[a] = null;
                }
                if (s && s[a]) {
                    t[a] = t[a] || {};
                    t[a].emphasis ? r(t[a].emphasis, s[a]) : (t[a].emphasis = s[a]);
                    s[a] = null;
                }
            }
        }
    }
    function ao(t, e, n) {
        if (t && t[e] && (t[e].normal || t[e].emphasis)) {
            var i = t[e].normal;
            var r = t[e].emphasis;
            if (i) {
                n ? ((t[e].normal = t[e].emphasis = null), s(t[e], i)) : (t[e] = i);
            }
            if (r) {
                t.emphasis = t.emphasis || {};
                t.emphasis[e] = r;
            }
        }
    }
    function oo(t) {
        ao(t, 'itemStyle');
        ao(t, 'lineStyle');
        ao(t, 'areaStyle');
        ao(t, 'label');
        ao(t, 'labelLine');
        ao(t, 'upperLabel');
        ao(t, 'edgeLabel');
    }
    function so(t, e) {
        var n = Ep(t) && t[e];
        var i = Ep(n) && n.textStyle;
        if (i) {
            for (r = 0, a = gf.length, void 0; a > r; r++) {
                var r;
                var a;
                var e = gf[r];
                if (i.hasOwnProperty(e)) {
                    n[e] = i[e];
                }
            }
        }
    }
    function lo(t) {
        if (t) {
            oo(t);
            so(t, 'label');
            if (t.emphasis) {
                so(t.emphasis, 'label');
            }
        }
    }
    function ho(t) {
        if (Ep(t)) {
            ro(t);
            oo(t);
            so(t, 'label');
            so(t, 'upperLabel');
            so(t, 'edgeLabel');
            if (t.emphasis) {
                so(t.emphasis, 'label');
                so(t.emphasis, 'upperLabel');
                so(t.emphasis, 'edgeLabel');
            }
            var e = t.markPoint;
            if (e) {
                ro(e);
                lo(e);
            }
            var n = t.markLine;
            if (n) {
                ro(n);
                lo(n);
            }
            var i = t.markArea;
            if (i) {
                lo(i);
            }
            var r = t.data;
            if ('graph' === t.type) {
                r = r || t.nodes;
                var a = t.links || t.edges;
                if (a && !S(a)) {
                    for (var o = 0; o < a.length; o++) {
                        lo(a[o]);
                    }
                }
                d(t.categories, function (t) {
                    oo(t);
                });
            }
            if (r && !S(r)) {
                for (var o = 0; o < r.length; o++) {
                    lo(r[o]);
                }
            }
            var e = t.markPoint;
            if (e && e.data) {
                for (s = e.data, o = 0, void 0; o < s.length; o++) {
                    var s;
                    var o;
                    lo(s[o]);
                }
            }
            var n = t.markLine;
            if (n && n.data) {
                for (l = n.data, o = 0, void 0; o < l.length; o++) {
                    var l;
                    var o;
                    _(l[o]) ? (lo(l[o][0]), lo(l[o][1])) : lo(l[o]);
                }
            }
            'gauge' === t.type
                ? (so(t, 'axisLabel'), so(t, 'title'), so(t, 'detail'))
                : 'treemap' === t.type
                ? (ao(t.breadcrumb, 'itemStyle'),
                  d(t.levels, function (t) {
                      oo(t);
                  }))
                : 'tree' === t.type && oo(t.leaves);
        }
    }
    function uo(t) {
        return _(t) ? t : t ? [t] : [];
    }
    function co(t) {
        return (_(t) ? t[0] : t) || {};
    }
    function fo(t, e) {
        e = e.split(',');
        for (n = t, i = 0, void 0; i < e.length && ((n = n && n[e[i]]), null != n); i++) {
            var n;
            var i;
        }
        return n;
    }
    function po(t, e, n, i) {
        e = e.split(',');
        for (a = t, o = 0, void 0; o < e.length - 1; o++) {
            var r;
            var a;
            var o;
            r = e[o];
            if (null == a[r]) {
                a[r] = {};
            }
            a = a[r];
        }
        if (i || null == a[e[o]]) {
            a[e[o]] = n;
        }
    }
    function go(t) {
        d(zp, function (e) {
            if (e[0] in t && !(e[1] in t)) {
                t[e[1]] = t[e[0]];
            }
        });
    }
    function vo(t) {
        d(t, function (e, n) {
            var i = [];
            var r = [0 / 0, 0 / 0];
            var a = [e.stackResultDimension, e.stackedOverDimension];
            var o = e.data;
            var s = e.isStackedByIndex;
            var l = o.map(a, function (a, l, h) {
                var u = o.get(e.stackedDimension, h);
                if (isNaN(u)) {
                    return r;
                }
                var c;
                var f;
                s ? (f = o.getRawIndex(h)) : (c = o.get(e.stackedByDimension, h));
                for (d = 0 / 0, p = n - 1, void 0; p >= 0; p--) {
                    var d;
                    var p;
                    var g = t[p];
                    s || (f = g.data.rawIndexOf(g.stackedByDimension, c));
                    if (f >= 0) {
                        var v = g.data.getByRawIndex(g.stackResultDimension, f);
                        if ((u >= 0 && v > 0) || (0 >= u && 0 > v)) {
                            u += v;
                            d = v;
                            break;
                        }
                    }
                }
                i[0] = u;
                i[1] = d;
                return i;
            });
            o.hostModel.setData(l);
            e.data = l;
        });
    }
    function mo(t, e) {
        Aa.isInstance(t) || (t = Aa.seriesDataToSource(t));
        this._source = t;
        var n = (this._data = t.data);
        var i = t.sourceFormat;
        if (i === xp) {
            this._offset = 0;
            this._dimSize = e;
            this._data = n;
        }
        var r = Hp[i === vp ? i + '_' + t.seriesLayoutBy : i];
        o(this, r);
    }
    function yo() {
        return this._data.length;
    }
    function _o(t) {
        return this._data[t];
    }
    function xo(t) {
        for (var e = 0; e < t.length; e++) {
            this._data.push(t[e]);
        }
    }
    function wo(t, e, n) {
        return null != n ? t[n] : t;
    }
    function bo(t, e, n, i) {
        return Mo(t[i], this._dimensionInfos[e]);
    }
    function Mo(t, e) {
        var n = e && e.type;
        if ('ordinal' === n) {
            var i = e && e.ordinalMeta;
            return i ? i.parseAndCollect(t) : t;
        }
        if ('time' === n && 'number' != typeof t && null != t && '-' !== t) {
            t = +ca(t);
        }
        return null == t || '' === t ? 0 / 0 : +t;
    }
    function So(t, e, n) {
        if (t) {
            var i = t.getRawDataItem(e);
            if (null != i) {
                var r;
                var a;
                var o = t.getProvider().getSource().sourceFormat;
                var s = t.getDimensionInfo(n);
                if (s) {
                    r = s.name;
                    a = s.index;
                }
                return Gp[o](i, e, a, r);
            }
        }
    }
    function Co(t) {
        return new To(t);
    }
    function To(t) {
        t = t || {};
        this._reset = t.reset;
        this._plan = t.plan;
        this._count = t.count;
        this._onDirty = t.onDirty;
        this._dirty = true;
        this.context;
    }
    function ko(t, e, n, i, r, a) {
        jp.reset(n, i, r, a);
        t._callingProgress = e;
        t._callingProgress(
            {
                start: n,
                end: i,
                count: i - n,
                next: jp.next
            },
            t.context
        );
    }
    function Do(t, e) {
        t._dueIndex = t._outputDueEnd = t._dueEnd = 0;
        t._settedOutputEnd = null;
        var n;
        var i;
        if (!e && t._reset) {
            n = t._reset(t.context);
            if (n && n.progress) {
                (i = n.forceFirstProgress), (n = n.progress);
            }
            if (_(n) && !n.length) {
                n = null;
            }
        }
        t._progress = n;
        t._modBy = t._modDataCount = null;
        var r = t._downstream;
        if (r) {
            r.dirty();
        }
        return i;
    }
    function Io(t) {
        var e = t.name;
        vi(t) || (t.name = Ao(t) || e);
    }
    function Ao(t) {
        var e = t.getRawData();
        var n = e.mapDimension('seriesName', true);
        var i = [];
        d(n, function (t) {
            var n = e.getDimensionInfo(t);
            if (n.displayName) {
                i.push(n.displayName);
            }
        });
        return i.join(' ');
    }
    function Lo(t) {
        return t.model.getRawData().count();
    }
    function Po(t) {
        var e = t.model;
        e.setData(e.getRawData().cloneShallow());
        return Oo;
    }
    function Oo(t, e) {
        if (t.end > e.outputData.count()) {
            e.model.getRawData().cloneShallow(e.outputData);
        }
    }
    function Eo(t, e) {
        d(t.CHANGABLE_METHODS, function (n) {
            t.wrapMethod(n, y(Ro, e));
        });
    }
    function Ro(t) {
        var e = Bo(t);
        if (e) {
            e.setOutputEnd(this.count());
        }
    }
    function Bo(t) {
        var e = (t.ecModel || {}).scheduler;
        var n = e && e.getPipeline(t.uid);
        if (n) {
            var i = n.currentTask;
            if (i) {
                var r = i.agentStubMap;
                if (r) {
                    i = r.get(t.uid);
                }
            }
            return i;
        }
    }
    function zo() {
        this.group = new mc();
        this.uid = ta('viewChart');
        this.renderTask = Co({
            plan: Vo,
            reset: Wo
        });
        this.renderTask.context = {
            view: this
        };
    }
    function No(t, e) {
        if (t && (t.trigger(e), 'group' === t.type)) {
            for (var n = 0; n < t.childCount(); n++) {
                No(t.childAt(n), e);
            }
        }
    }
    function Fo(t, e, n) {
        var i = yi(t, e);
        null != i
            ? d(ui(i), function (e) {
                  No(t.getItemGraphicEl(e), n);
              })
            : t.eachItemGraphicEl(function (t) {
                  No(t, n);
              });
    }
    function Vo(t) {
        return eg(t.model);
    }
    function Wo(t) {
        var e = t.model;
        var n = t.ecModel;
        var i = t.api;
        var r = t.payload;
        var a = e.pipelineContext.progressiveRender;
        var o = t.view;
        var s = r && tg(r).updateMethod;
        var l = a ? 'incrementalPrepareRender' : s && o[s] ? s : 'render';
        if ('render' !== l) {
            o[l](e, n, i, r);
        }
        return ig[l];
    }
    function Ho(t, e, n) {
        function i() {
            u = new Date().getTime();
            c = null;
            t.apply(o, s || []);
        }
        var r;
        var a;
        var o;
        var s;
        var l;
        var h = 0;
        var u = 0;
        var c = null;
        e = e || 0;
        var f = function () {
            r = new Date().getTime();
            o = this;
            s = arguments;
            var t = l || e;
            var f = l || n;
            l = null;
            a = r - (f ? h : u) - t;
            clearTimeout(c);
            f ? (c = setTimeout(i, t)) : a >= 0 ? i() : (c = setTimeout(i, -a));
            h = r;
        };
        f.clear = function () {
            if (c) {
                clearTimeout(c);
                c = null;
            }
        };
        f.debounceNextCall = function (t) {
            l = t;
        };
        return f;
    }
    function Go(t, e, n, i) {
        this.ecInstance = t;
        this.api = e;
        this.unfinished;
        var n = (this._dataProcessorHandlers = n.slice());
        var i = (this._visualHandlers = i.slice());
        this._allHandlers = n.concat(i);
        this._stageTaskMap = z();
    }
    function qo(t, e, n, i, r) {
        function a(t, e) {
            return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id));
        }
        r = r || {};
        var o;
        d(e, function (e) {
            if (!r.visualType || r.visualType === e.visualType) {
                var s = t._stageTaskMap.get(e.uid);
                var l = s.seriesTaskMap;
                var h = s.overallTask;
                if (h) {
                    var u;
                    var c = h.agentStubMap;
                    c.each(function (t) {
                        if (a(r, t)) {
                            t.dirty();
                            u = true;
                        }
                    });
                    if (u) {
                        h.dirty();
                    }
                    ug(h, i);
                    var f = t.getPerformArgs(h, r.block);
                    c.each(function (t) {
                        t.perform(f);
                    });
                    o |= h.perform(f);
                } else {
                    if (l) {
                        l.each(function (s) {
                            if (a(r, s)) {
                                s.dirty();
                            }
                            var l = t.getPerformArgs(s, r.block);
                            l.skip = !e.performRawSeries && n.isSeriesFiltered(s.context.model);
                            ug(s, i);
                            o |= s.perform(l);
                        });
                    }
                }
            }
        });
        t.unfinished |= o;
    }
    function Xo(t, e, n, i, r) {
        function a(n) {
            var a = n.uid;
            var s =
                o.get(a) ||
                o.set(
                    a,
                    Co({
                        plan: Ko,
                        reset: Qo,
                        count: ts
                    })
                );
            s.context = {
                model: n,
                ecModel: i,
                api: r,
                useClearVisual: e.isVisual && !e.isLayout,
                plan: e.plan,
                reset: e.reset,
                scheduler: t
            };
            es(t, n, s);
        }
        var o = n.seriesTaskMap || (n.seriesTaskMap = z());
        var s = e.seriesType;
        var l = e.getTargetSeries;
        e.createOnAllSeries ? i.eachRawSeries(a) : s ? i.eachRawSeriesByType(s, a) : l && l(i, r).each(a);
        var h = t._pipelineMap;
        o.each(function (t, e) {
            h.get(e) || (t.dispose(), o.removeKey(e));
        });
    }
    function Uo(t, e, n, i, r) {
        function a(e) {
            var n = e.uid;
            var i = s.get(n);
            i ||
                ((i = s.set(
                    n,
                    Co({
                        reset: jo,
                        onDirty: $o
                    })
                )),
                o.dirty());
            i.context = {
                model: e,
                overallProgress: u,
                modifyOutputEnd: c
            };
            i.agent = o;
            i.__block = u;
            es(t, e, i);
        }
        var o = (n.overallTask =
            n.overallTask ||
            Co({
                reset: Yo
            }));
        o.context = {
            ecModel: i,
            api: r,
            overallReset: e.overallReset,
            scheduler: t
        };
        var s = (o.agentStubMap = o.agentStubMap || z());
        var l = e.seriesType;
        var h = e.getTargetSeries;
        var u = true;
        var c = e.modifyOutputEnd;
        l ? i.eachRawSeriesByType(l, a) : h ? h(i, r).each(a) : ((u = false), d(i.getSeries(), a));
        var f = t._pipelineMap;
        s.each(function (t, e) {
            f.get(e) || (t.dispose(), o.dirty(), s.removeKey(e));
        });
    }
    function Yo(t) {
        t.overallReset(t.ecModel, t.api, t.payload);
    }
    function jo(t) {
        return t.overallProgress && Zo;
    }
    function Zo() {
        this.agent.dirty();
        this.getDownstream().dirty();
    }
    function $o() {
        if (this.agent) {
            this.agent.dirty();
        }
    }
    function Ko(t) {
        return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload);
    }
    function Qo(t) {
        if (t.useClearVisual) {
            t.data.clearAllVisual();
        }
        var e = (t.resetDefines = ui(t.reset(t.model, t.ecModel, t.api, t.payload)));
        return e.length > 1
            ? p(e, function (t, e) {
                  return Jo(e);
              })
            : cg;
    }
    function Jo(t) {
        return function (e, n) {
            var i = n.data;
            var r = n.resetDefines[t];
            if (r && r.dataEach) {
                for (var a = e.start; a < e.end; a++) {
                    r.dataEach(i, a);
                }
            } else {
                if (r && r.progress) {
                    r.progress(e, i);
                }
            }
        };
    }
    function ts(t) {
        return t.data.count();
    }
    function es(t, e, n) {
        var i = e.uid;
        var r = t._pipelineMap.get(i);
        if (!r.head) {
            r.head = n;
        }
        if (r.tail) {
            r.tail.pipe(n);
        }
        r.tail = n;
        n.__idxInPipeline = r.count++;
        n.__pipeline = r;
    }
    function ns(t) {
        fg = null;
        try {
            t(dg, pg);
        } catch (e) {
            console.log('CatchClause', e);
            console.log('CatchClause', e);
        }
        return fg;
    }
    function is(t, e) {
        for (var n in e.prototype) {
            t[n] = N;
        }
    }
    function rs(t) {
        return function (e, n, i) {
            e = e && e.toLowerCase();
            Vu.prototype[t].call(this, e, n, i);
        };
    }
    function as() {
        Vu.call(this);
    }
    function os(t, e, n) {
        function r(t, e) {
            return t.__prio - e.__prio;
        }
        n = n || {};
        if ('string' == typeof e) {
            e = Zg[e];
        }
        this.id;
        this.group;
        this._dom = t;
        var a = 'canvas';
        var o = (this._zr = hi(t, {
            renderer: n.renderer || a,
            devicePixelRatio: n.devicePixelRatio,
            width: n.width,
            height: n.height
        }));
        this._throttledZrFlush = Ho(m(o.flush, o), 17);
        var e = i(e);
        if (e) {
            Fp(e, true);
        }
        this._theme = e;
        this._chartsViews = [];
        this._chartsMap = {};
        this._componentsViews = [];
        this._componentsMap = {};
        this._coordSysMgr = new Ka();
        var s = (this._api = Ss(this));
        je(jg, r);
        je(Xg, r);
        this._scheduler = new Go(this, s, Xg, jg);
        Vu.call(this);
        this._messageCenter = new as();
        this._initEvents();
        this.resize = m(this.resize, this);
        this._pendingActions = [];
        o.animation.on('frame', this._onframe, this);
        ps(o, this);
        E(this);
    }
    function ss(t, e, n) {
        var i;
        var r = this._model;
        var a = this._coordSysMgr.getCoordinateSystems();
        e = xi(r, e);
        for (var o = 0; o < a.length; o++) {
            var s = a[o];
            if (s[t] && null != (i = s[t](r, e, n))) {
                return i;
            }
        }
    }
    function ls(t) {
        var e = t._model;
        var n = t._scheduler;
        n.restorePipelines(e);
        n.prepareStageTasks();
        gs(t, 'component', e, n);
        gs(t, 'chart', e, n);
        n.plan();
    }
    function hs(t, e, n, i, r) {
        function a(i) {
            if (i && i.__alive && i[e]) {
                i[e](i.__model, o, t._api, n);
            }
        }
        var o = t._model;
        if (!i) {
            return void bg(t._componentsViews.concat(t._chartsViews), a);
        }
        var s = {};
        s[i + 'Id'] = n[i + 'Id'];
        s[i + 'Index'] = n[i + 'Index'];
        s[i + 'Name'] = n[i + 'Name'];
        var l = {
            mainType: i,
            query: s
        };
        if (r) {
            l.subType = r;
        }
        var h = n.excludeSeriesId;
        if (null != h) {
            h = z(ui(h));
        }
        if (o) {
            o.eachComponent(
                l,
                function (e) {
                    (h && null != h.get(e.id)) || a(t['series' === i ? '_chartsMap' : '_componentsMap'][e.__viewId]);
                },
                t
            );
        }
    }
    function us(t, e) {
        var n = t._chartsMap;
        var i = t._scheduler;
        e.eachSeries(function (t) {
            i.updateStreamModes(t, n[t.__viewId]);
        });
    }
    function cs(t, e) {
        var n = t.type;
        var i = t.escapeConnect;
        var r = Gg[n];
        var a = r.actionInfo;
        var l = (a.update || 'update').split(':');
        var h = l.pop();
        l = null != l[0] && Cg(l[0]);
        this[zg] = true;
        var u = [t];
        var c = false;
        if (t.batch) {
            c = true;
            u = p(t.batch, function (e) {
                e = s(o({}, e), t);
                e.batch = null;
                return e;
            });
        }
        var f;
        var d = [];
        var g = 'highlight' === n || 'downplay' === n;
        bg(
            u,
            function (t) {
                f = r.action(t, this._model, this._api);
                f = f || o({}, t);
                f.type = a.event || f.type;
                d.push(f);
                g ? hs(this, h, t, 'series') : l && hs(this, h, t, l.main, l.sub);
            },
            this
        );
        'none' === h || g || l || (this[Ng] ? (ls(this), Wg.update.call(this, t), (this[Ng] = false)) : Wg[h].call(this, t));
        f = c
            ? {
                  type: a.event || n,
                  escapeConnect: i,
                  batch: d
              }
            : d[0];
        this[zg] = false;
        if (!e) {
            this._messageCenter.trigger(f.type, f);
        }
    }
    function fs(t) {
        for (var e = this._pendingActions; e.length; ) {
            var n = e.shift();
            cs.call(this, n, t);
        }
    }
    function ds(t) {
        if (!t) {
            this.trigger('updated');
        }
    }
    function ps(t, e) {
        t.on('rendered', function () {
            e.trigger('rendered');
            !t.animation.isFinished() || e[Ng] || e._scheduler.unfinished || e._pendingActions.length || e.trigger('finished');
        });
    }
    function gs(t, e, n, i) {
        function r(t) {
            var e = '_ec_' + t.id + '_' + t.type;
            var r = s[e];
            if (!r) {
                var u = Cg(t.type);
                var c = a ? Kp.getClass(u.main, u.sub) : zo.getClass(u.sub);
                r = new c();
                r.init(n, h);
                s[e] = r;
                o.push(r);
                l.add(r.group);
            }
            t.__viewId = r.__id = e;
            r.__alive = true;
            r.__model = t;
            r.group.__ecComponentInfo = {
                mainType: t.mainType,
                index: t.componentIndex
            };
            if (!a) {
                i.prepareView(r, t, n, h);
            }
        }
        for (a = 'component' === e, o = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, h = t._api, u = 0, void 0; u < o.length; u++) {
            var a;
            var o;
            var s;
            var l;
            var h;
            var u;
            o[u].__alive = false;
        }
        a
            ? n.eachComponent(function (t, e) {
                  if ('series' !== t) {
                      r(e);
                  }
              })
            : n.eachSeries(r);
        for (var u = 0; u < o.length; ) {
            var c = o[u];
            c.__alive ? u++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(n, h), o.splice(u, 1), delete s[c.__id], (c.__id = c.group.__ecComponentInfo = null));
        }
    }
    function vs(t) {
        t.clearColorPalette();
        t.eachSeries(function (t) {
            t.clearColorPalette();
        });
    }
    function ms(t, e, n, i) {
        ys(t, e, n, i);
        bg(t._chartsViews, function (t) {
            t.__alive = false;
        });
        _s(t, e, n, i);
        bg(t._chartsViews, function (t) {
            t.__alive || t.remove(e, n);
        });
    }
    function ys(t, e, n, i, r) {
        bg(r || t._componentsViews, function (t) {
            var r = t.__model;
            t.render(r, e, n, i);
            Ms(r, t);
        });
    }
    function _s(t, e, n, i, r) {
        var a;
        var o = t._scheduler;
        e.eachSeries(function (e) {
            var n = t._chartsMap[e.__viewId];
            n.__alive = true;
            var s = n.renderTask;
            o.updatePayload(s, i);
            if (r && r.get(e.uid)) {
                s.dirty();
            }
            a |= s.perform(o.getPerformArgs(s));
            n.group.silent = !!e.get('silent');
            Ms(e, n);
            bs(e, n);
        });
        o.unfinished |= a;
        ws(t._zr, e);
        og(t._zr.dom, e);
    }
    function xs(t, e) {
        bg(Yg, function (n) {
            n(t, e);
        });
    }
    function ws(t, e) {
        var n = t.storage;
        var i = 0;
        n.traverse(function (t) {
            t.isGroup || i++;
        });
        if (i > e.get('hoverLayerThreshold') && !bu.node) {
            n.traverse(function (t) {
                t.isGroup || (t.useHoverLayer = true);
            });
        }
    }
    function bs(t, e) {
        var n = t.get('blendMode') || null;
        e.group.traverse(function (t) {
            t.isGroup || (t.style.blend !== n && t.setStyle('blend', n));
            if (t.eachPendingDisplayable) {
                t.eachPendingDisplayable(function (t) {
                    t.setStyle('blend', n);
                });
            }
        });
    }
    function Ms(t, e) {
        var n = t.get('z');
        var i = t.get('zlevel');
        e.group.traverse(function (t) {
            if ('group' !== t.type) {
                if (null != n) {
                    t.z = n;
                }
                if (null != i) {
                    t.zlevel = i;
                }
            }
        });
    }
    function Ss(t) {
        var e = t._coordSysMgr;
        return o(new $a(t), {
            getCoordinateSystems: m(e.getCoordinateSystems, e),
            getComponentByElement: function (e) {
                for (; e; ) {
                    var n = e.__ecComponentInfo;
                    if (null != n) {
                        return t._model.getComponent(n.mainType, n.index);
                    }
                    e = e.parent;
                }
            }
        });
    }
    function Cs(t) {
        function e(t, e) {
            for (var n = 0; n < t.length; n++) {
                var i = t[n];
                i[a] = e;
            }
        }
        var n = 0;
        var i = 1;
        var r = 2;
        var a = '__connectUpdateStatus';
        bg(qg, function (o, s) {
            t._messageCenter.on(s, function (o) {
                if (Qg[t.group] && t[a] !== n) {
                    if (o && o.escapeConnect) {
                        return;
                    }
                    var s = t.makeActionFromEvent(o);
                    var l = [];
                    bg(Kg, function (e) {
                        if (e !== t && e.group === t.group) {
                            l.push(e);
                        }
                    });
                    e(l, n);
                    bg(l, function (t) {
                        if (t[a] !== i) {
                            t.dispatchAction(s);
                        }
                    });
                    e(l, r);
                }
            });
        });
    }
    function Ts(t, e, n) {
        var i = As(t);
        if (i) {
            return i;
        }
        var r = new os(t, e, n);
        r.id = 'ec_' + Jg++;
        Kg[r.id] = r;
        bi(t, ev, r.id);
        Cs(r);
        return r;
    }
    function ks(t) {
        if (_(t)) {
            var e = t;
            t = null;
            bg(e, function (e) {
                if (null != e.group) {
                    t = e.group;
                }
            });
            t = t || 'g_' + tv++;
            bg(e, function (e) {
                e.group = t;
            });
        }
        Qg[t] = true;
        return t;
    }
    function Ds(t) {
        Qg[t] = false;
    }
    function Is(t) {
        'string' == typeof t ? (t = Kg[t]) : t instanceof os || (t = As(t));
        if (t instanceof os && !t.isDisposed()) {
            t.dispose();
        }
    }
    function As(t) {
        return Kg[Mi(t, ev)];
    }
    function Ls(t) {
        return Kg[t];
    }
    function Ps(t, e) {
        Zg[t] = e;
    }
    function Os(t) {
        Ug.push(t);
    }
    function Es(t, e) {
        Ws(Xg, t, e, Ig);
    }
    function Rs(t) {
        Yg.push(t);
    }
    function Bs(t, e, n) {
        if ('function' == typeof e) {
            n = e;
            e = '';
        }
        var i = Sg(t)
            ? t.type
            : [
                  t,
                  (t = {
                      event: e
                  })
              ][0];
        t.event = (t.event || i).toLowerCase();
        e = t.event;
        wg(Fg.test(i) && Fg.test(e));
        Gg[i] ||
            (Gg[i] = {
                action: n,
                actionInfo: t
            });
        qg[e] = i;
    }
    function zs(t, e) {
        Ka.register(t, e);
    }
    function Ns(t) {
        var e = Ka.get(t);
        return e ? (e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()) : void 0;
    }
    function Fs(t, e) {
        Ws(jg, t, e, Lg, 'layout');
    }
    function Vs(t, e) {
        Ws(jg, t, e, Og, 'visual');
    }
    function Ws(t, e, n, i, r) {
        if (Mg(e) || Sg(e)) {
            n = e;
            e = i;
        }
        var a = Go.wrapStageHandler(n, r);
        a.__prio = e;
        a.__raw = n;
        t.push(a);
        return a;
    }
    function Hs(t, e) {
        $g[t] = e;
    }
    function Gs(t) {
        return hp.extend(t);
    }
    function qs(t) {
        return Kp.extend(t);
    }
    function Xs(t) {
        return $p.extend(t);
    }
    function Us(t) {
        return zo.extend(t);
    }
    function Ys(t) {
        n('createCanvas', t);
    }
    function js(t, e, n) {
        if (e.geoJson && !e.features) {
            n = e.specialAreas;
            e = e.geoJson;
        }
        if ('string' == typeof e) {
            e = 'undefined' != typeof JSON && JSON.parse ? JSON.parse(e) : new Function('return (' + e + ');')();
        }
        nv[t] = {
            geoJson: e,
            specialAreas: n
        };
    }
    function Zs(t) {
        return nv[t];
    }
    function $s(t) {
        return t;
    }
    function Ks(t, e, n, i, r) {
        this._old = t;
        this._new = e;
        this._oldKeyGetter = n || $s;
        this._newKeyGetter = i || $s;
        this.context = r;
    }
    function Qs(t, e, n, i, r) {
        for (var a = 0; a < t.length; a++) {
            var o = '_ec_' + r[i](t[a], a);
            var s = e[o];
            null == s ? (n.push(o), (e[o] = a)) : (s.length || (e[o] = s = [s]), s.push(a));
        }
    }
    function Js(t) {
        var e = {};
        var n = (e.encode = {});
        var i = z();
        var r = [];
        var a = [];
        d(t.dimensions, function (e) {
            var o = t.getDimensionInfo(e);
            var s = o.coordDim;
            if (s) {
                var l = n[s];
                n.hasOwnProperty(s) || (l = n[s] = []);
                l[o.coordDimIndex] = e;
                o.isExtraCoord || (i.set(s, 1), el(o.type) && (r[0] = e));
                if (o.defaultTooltip) {
                    a.push(e);
                }
            }
            av.each(function (t, e) {
                var i = n[e];
                n.hasOwnProperty(e) || (i = n[e] = []);
                var r = o.otherDims[e];
                if (null != r && r !== false) {
                    i[r] = o.name;
                }
            });
        });
        var o = [];
        var s = {};
        i.each(function (t, e) {
            var i = n[e];
            s[e] = i[0];
            o = o.concat(i);
        });
        e.dataDimsOnCoord = o;
        e.encodeFirstDimNotExtra = s;
        var l = n.label;
        if (l && l.length) {
            r = l.slice();
        }
        var h = n.tooltip;
        h && h.length ? (a = h.slice()) : a.length || (a = r.slice());
        n.defaultedLabel = r;
        n.defaultedTooltip = a;
        return e;
    }
    function tl(t) {
        return 'category' === t ? 'ordinal' : 'time' === t ? 'time' : 'float';
    }
    function el(t) {
        return !('ordinal' === t || 'time' === t);
    }
    function nl(t) {
        return t._rawCount > 65535 ? uv : cv;
    }
    function il(t) {
        var e = t.constructor;
        return e === Array ? t.slice() : new e(t);
    }
    function rl(t, e) {
        d(fv.concat(e.__wrappedMethods || []), function (n) {
            if (e.hasOwnProperty(n)) {
                t[n] = e[n];
            }
        });
        t.__wrappedMethods = e.__wrappedMethods;
        d(dv, function (n) {
            t[n] = i(e[n]);
        });
        t._calculationInfo = o(e._calculationInfo);
    }
    function al(t) {
        var e = t._invertedIndicesMap;
        d(e, function (n, i) {
            var r = t._dimensionInfos[i];
            var a = r.ordinalMeta;
            if (a) {
                n = e[i] = new uv(a.categories.length);
                for (var o = 0; o < n.length; o++) {
                    n[o] = 0 / 0;
                }
                for (var o = 0; o < t._count; o++) {
                    n[t.get(i, o)] = o;
                }
            }
        });
    }
    function ol(t, e, n) {
        var i;
        if (null != e) {
            var r = t._chunkSize;
            var a = Math.floor(n / r);
            var o = n % r;
            var s = t.dimensions[e];
            var l = t._storage[s][a];
            if (l) {
                i = l[o];
                var h = t._dimensionInfos[s].ordinalMeta;
                if (h && h.categories.length) {
                    i = h.categories[i];
                }
            }
        }
        return i;
    }
    function sl(t) {
        return t;
    }
    function ll(t) {
        return t < this._count && t >= 0 ? this._indices[t] : -1;
    }
    function hl(t, e) {
        var n = t._idList[e];
        if (null == n) {
            n = ol(t, t._idDimIdx, e);
        }
        if (null == n) {
            n = lv + e;
        }
        return n;
    }
    function ul(t) {
        _(t) || (t = [t]);
        return t;
    }
    function cl(t, e) {
        var n = t.dimensions;
        var i = new pv(p(n, t.getDimensionInfo, t), t.hostModel);
        rl(i, t);
        for (r = i._storage = {}, a = t._storage, o = 0, void 0; o < n.length; o++) {
            var r;
            var a;
            var o;
            var s = n[o];
            if (a[s]) {
                h(e, s) >= 0 ? ((r[s] = fl(a[s])), (i._rawExtent[s] = dl()), (i._extent[s] = null)) : (r[s] = a[s]);
            }
        }
        return i;
    }
    function fl(t) {
        for (e = new Array(t.length), n = 0, void 0; n < t.length; n++) {
            var e;
            var n;
            e[n] = il(t[n]);
        }
        return e;
    }
    function dl() {
        return [1 / 0, -1 / 0];
    }
    function pl(t, e, n) {
        function r(t, e, n) {
            null != av.get(e) ? (t.otherDims[e] = n) : ((t.coordDim = e), (t.coordDimIndex = n), u.set(e, true));
        }
        Aa.isInstance(e) || (e = Aa.seriesDataToSource(e));
        n = n || {};
        t = (t || []).slice();
        for (a = (n.dimsDef || []).slice(), l = z(n.encodeDef), h = z(), u = z(), c = [], f = gl(e, t, a, n.dimCount), p = 0, void 0; f > p; p++) {
            var a;
            var l;
            var h;
            var u;
            var c;
            var f;
            var p;
            var g = (a[p] = o(
                {},
                b(a[p])
                    ? a[p]
                    : {
                          name: a[p]
                      }
            ));
            var v = g.name;
            var m = (c[p] = {
                otherDims: {}
            });
            if (null != v && null == h.get(v)) {
                m.name = m.displayName = v;
                h.set(v, p);
            }
            if (null != g.type) {
                m.type = g.type;
            }
            if (null != g.displayName) {
                m.displayName = g.displayName;
            }
        }
        l.each(function (t, e) {
            t = ui(t).slice();
            var n = l.set(e, []);
            d(t, function (t, i) {
                if (w(t)) {
                    t = h.get(t);
                }
                if (null != t && f > t) {
                    n[i] = t;
                    r(c[t], e, i);
                }
            });
        });
        var y = 0;
        d(t, function (t) {
            var e;
            var t;
            var n;
            var a;
            if (w(t)) {
                e = t;
                t = {};
            } else {
                e = t.name;
                var o = t.ordinalMeta;
                t.ordinalMeta = null;
                t = i(t);
                t.ordinalMeta = o;
                n = t.dimsDef;
                a = t.otherDims;
                t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null;
            }
            var h = ui(l.get(e));
            if (!h.length) {
                for (var u = 0; u < ((n && n.length) || 1); u++) {
                    for (; y < c.length && null != c[y].coordDim; ) {
                        y++;
                    }
                    if (y < c.length) {
                        h.push(y++);
                    }
                }
            }
            d(h, function (i, o) {
                var l = c[i];
                r(s(l, t), e, o);
                if (null == l.name && n) {
                    var h = n[o];
                    if (!b(h)) {
                        h = {
                            name: h
                        };
                    }
                    l.name = l.displayName = h.name;
                    l.defaultTooltip = h.defaultTooltip;
                }
                if (a) {
                    s(l.otherDims, a);
                }
            });
        });
        var _ = n.generateCoord;
        var x = n.generateCoordCount;
        var M = null != x;
        x = _ ? x || 1 : 0;
        for (S = _ || 'value', C = 0, void 0; f > C; C++) {
            var S;
            var C;
            var m = (c[C] = c[C] || {});
            var T = m.coordDim;
            if (null == T) {
                m.coordDim = vl(S, u, M);
                m.coordDimIndex = 0;
                if (!_ || 0 >= x) {
                    m.isExtraCoord = true;
                }
                x--;
            }
            if (null == m.name) {
                m.name = vl(m.coordDim, h);
            }
            if (null == m.type && Wa(e, C, m.name)) {
                m.type = 'ordinal';
            }
        }
        return c;
    }
    function gl(t, e, n, i) {
        var r = Math.max(t.dimensionsDetectCount || 1, e.length, n.length, i || 0);
        d(e, function (t) {
            var e = t.dimsDef;
            if (e) {
                r = Math.max(r, e.length);
            }
        });
        return r;
    }
    function vl(t, e, n) {
        if (n || null != e.get(t)) {
            for (var i = 0; null != e.get(t + i); ) {
                i++;
            }
            t += i;
        }
        e.set(t, true);
        return t;
    }
    function ml(t, e, n) {
        n = n || {};
        var i;
        var r;
        var a;
        var o;
        var s = n.byIndex;
        var l = n.stackedCoordDimension;
        var h = !(!t || !t.get('stack'));
        d(e, function (t, n) {
            if (w(t)) {
                e[n] = t = {
                    name: t
                };
            }
            if (h && !t.isExtraCoord) {
                s || i || !t.ordinalMeta || (i = t);
                r || 'ordinal' === t.type || 'time' === t.type || (l && l !== t.coordDim) || (r = t);
            }
        });
        !r || s || i || (s = true);
        if (r) {
            a = '__\0ecstackresult';
            o = '__\0ecstackedover';
            if (i) {
                i.createInvertedIndices = true;
            }
            var u = r.coordDim;
            var c = r.type;
            var f = 0;
            d(e, function (t) {
                if (t.coordDim === u) {
                    f++;
                }
            });
            e.push({
                name: a,
                coordDim: u,
                coordDimIndex: f,
                type: c,
                isExtraCoord: true,
                isCalculationCoord: true
            });
            f++;
            e.push({
                name: o,
                coordDim: o,
                coordDimIndex: f,
                type: c,
                isExtraCoord: true,
                isCalculationCoord: true
            });
        }
        return {
            stackedDimension: r && r.name,
            stackedByDimension: i && i.name,
            isStackedByIndex: s,
            stackedOverDimension: o,
            stackResultDimension: a
        };
    }
    function yl(t, e) {
        return !!e && e === t.getCalculationInfo('stackedDimension');
    }
    function _l(t, e) {
        return yl(t, e) ? t.getCalculationInfo('stackResultDimension') : e;
    }
    function xl(t, e, n) {
        n = n || {};
        Aa.isInstance(t) || (t = Aa.seriesDataToSource(t));
        var i;
        var r = e.get('coordinateSystem');
        var a = Ka.get(r);
        var o = Da(e);
        if (o) {
            i = p(o.coordSysDims, function (t) {
                var e = {
                    name: t
                };
                var n = o.axisMap.get(t);
                if (n) {
                    var i = n.get('type');
                    e.type = tl(i);
                }
                return e;
            });
        }
        i || (i = (a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice())) || ['x', 'y']);
        var s;
        var l;
        var h = mv(t, {
            coordDimensions: i,
            generateCoord: n.generateCoord
        });
        if (o) {
            d(h, function (t, e) {
                var n = t.coordDim;
                var i = o.categoryAxisMap.get(n);
                if (i) {
                    if (null == s) {
                        s = e;
                    }
                    t.ordinalMeta = i.getOrdinalMeta();
                }
                if (null != t.otherDims.itemName) {
                    l = true;
                }
            });
        }
        l || null == s || (h[s].otherDims.itemName = 0);
        var u = ml(e, h);
        var c = new pv(h, e);
        c.setCalculationInfo(u);
        var f =
            null != s && wl(t)
                ? function (t, e, n, i) {
                      return i === s ? n : this.defaultDimValueGetter(t, e, n, i);
                  }
                : null;
        c.hasItemOption = false;
        c.initData(t, null, f);
        return c;
    }
    function wl(t) {
        if (t.sourceFormat === gp) {
            var e = bl(t.data || []);
            return null != e && !_(fi(e));
        }
    }
    function bl(t) {
        for (var e = 0; e < t.length && null == t[e]; ) {
            e++;
        }
        return t[e];
    }
    function Ml(t, e) {
        if ('image' !== this.type) {
            var n = this.style;
            var i = this.shape;
            i && 'line' === i.symbolType ? (n.stroke = t) : this.__isEmptyBrush ? ((n.stroke = t), (n.fill = e || '#fff')) : (n.fill && (n.fill = t), n.stroke && (n.stroke = t));
            this.dirty(false);
        }
    }
    function Sl(t, e, n, i, r, a, o) {
        var s = 0 === t.indexOf('empty');
        if (s) {
            t = t.substr(5, 1).toLowerCase() + t.substr(6);
        }
        var l;
        l =
            0 === t.indexOf('image://')
                ? xr(t.slice(8), new Ve(e, n, i, r), o ? 'center' : 'cover')
                : 0 === t.indexOf('path://')
                ? _r(t.slice(7), {}, new Ve(e, n, i, r), o ? 'center' : 'cover')
                : new Cv({
                      shape: {
                          symbolType: t,
                          x: e,
                          y: n,
                          width: i,
                          height: r
                      }
                  });
        l.__isEmptyBrush = s;
        l.setColor = Ml;
        l.setColor(a);
        return l;
    }
    function Cl(t, e) {
        var n = t.mapDimension('defaultedLabel', true);
        var i = n.length;
        if (1 === i) {
            return So(t, e, n[0]);
        }
        if (i) {
            for (r = [], a = 0, void 0; a < n.length; a++) {
                var r;
                var a;
                var o = So(t, e, n[a]);
                r.push(o);
            }
            return r.join(' ');
        }
    }
    function Tl(t, e, n) {
        mc.call(this);
        this.updateData(t, e, n);
    }
    function kl(t) {
        return [t[0] / 2, t[1] / 2];
    }
    function Dl(t, e) {
        this.parent.drift(t, e);
    }
    function Il(t) {
        this.group = new mc();
        this._symbolCtor = t || Tl;
    }
    function Al(t, e, n, i) {
        return !(!e || isNaN(e[0]) || isNaN(e[1]) || (i.isIgnore && i.isIgnore(n)) || (i.clipShape && !i.clipShape.contain(e[0], e[1])) || 'none' === t.getItemVisual(n, 'symbol'));
    }
    function Ll(t) {
        null == t ||
            b(t) ||
            (t = {
                isIgnore: t
            });
        return t || {};
    }
    function Pl(t) {
        var e = t.hostModel;
        return {
            itemStyle: e.getModel('itemStyle').getItemStyle(['color']),
            hoverItemStyle: e.getModel('emphasis.itemStyle').getItemStyle(),
            symbolRotate: e.get('symbolRotate'),
            symbolOffset: e.get('symbolOffset'),
            hoverAnimation: e.get('hoverAnimation'),
            labelModel: e.getModel('label'),
            hoverLabelModel: e.getModel('emphasis.label'),
            cursorStyle: e.get('cursor')
        };
    }
    function Ol(t, e, n) {
        var i;
        var r = t.getBaseAxis();
        var a = t.getOtherAxis(r);
        var o = El(a, n);
        var s = r.dim;
        var l = a.dim;
        var h = e.mapDimension(l);
        var u = e.mapDimension(s);
        var c = 'x' === l || 'radius' === l ? 1 : 0;
        var f = p(t.dimensions, function (t) {
            return e.mapDimension(t);
        });
        var d = e.getCalculationInfo('stackResultDimension');
        if ((i |= yl(e, f[0]))) {
            f[0] = d;
        }
        if ((i |= yl(e, f[1]))) {
            f[1] = d;
        }
        return {
            dataDimsForPoint: f,
            valueStart: o,
            valueAxisDim: l,
            baseAxisDim: s,
            stacked: !!i,
            valueDim: h,
            baseDim: u,
            baseDataOffset: c,
            stackedOverDimension: e.getCalculationInfo('stackedOverDimension')
        };
    }
    function El(t, e) {
        var n = 0;
        var i = t.scale.getExtent();
        'start' === e ? (n = i[0]) : 'end' === e ? (n = i[1]) : i[0] > 0 ? (n = i[0]) : i[1] < 0 && (n = i[1]);
        return n;
    }
    function Rl(t, e, n, i) {
        var r = 0 / 0;
        if (t.stacked) {
            r = n.get(n.getCalculationInfo('stackedOverDimension'), i);
        }
        if (isNaN(r)) {
            r = t.valueStart;
        }
        var a = t.baseDataOffset;
        var o = [];
        o[a] = n.get(t.baseDim, i);
        o[1 - a] = r;
        return e.dataToPoint(o);
    }
    function Bl(t, e) {
        var n = [];
        e.diff(t)
            .add(function (t) {
                n.push({
                    cmd: '+',
                    idx: t
                });
            })
            .update(function (t, e) {
                n.push({
                    cmd: '=',
                    idx: e,
                    idx1: t
                });
            })
            .remove(function (t) {
                n.push({
                    cmd: '-',
                    idx: t
                });
            })
            .execute();
        return n;
    }
    function zl(t) {
        return isNaN(t[0]) || isNaN(t[1]);
    }
    function Nl(t, e, n, i, r, a, o, s, l, h) {
        return 'none' !== h && h ? Fl.apply(this, arguments) : Vl.apply(this, arguments);
    }
    function Fl(t, e, n, i, r, a, o, s, l, h, u) {
        for (c = 0, f = n, d = 0, void 0; i > d; d++) {
            var c;
            var f;
            var d;
            var p = e[f];
            if (f >= r || 0 > f) {
                break;
            }
            if (zl(p)) {
                if (u) {
                    f += a;
                    continue;
                }
                break;
            }
            if (f === n) t[a > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);
            else if (l > 0) {
                var g = e[c];
                var v = 'y' === h ? 1 : 0;
                var m = (p[v] - g[v]) * l;
                zv(Fv, g);
                Fv[v] = g[v] + m;
                zv(Vv, p);
                Vv[v] = p[v] - m;
                t.bezierCurveTo(Fv[0], Fv[1], Vv[0], Vv[1], p[0], p[1]);
            } else {
                t.lineTo(p[0], p[1]);
            }
            c = f;
            f += a;
        }
        return d;
    }
    function Vl(t, e, n, i, r, a, o, s, l, h, u) {
        for (c = 0, f = n, d = 0, void 0; i > d; d++) {
            var c;
            var f;
            var d;
            var p = e[f];
            if (f >= r || 0 > f) {
                break;
            }
            if (zl(p)) {
                if (u) {
                    f += a;
                    continue;
                }
                break;
            }
            if (f === n) {
                t[a > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);
                zv(Fv, p);
            } else if (l > 0) {
                var g = f + a;
                var v = e[g];
                if (u) {
                    for (; v && zl(e[g]); ) {
                        g += a;
                        v = e[g];
                    }
                }
                var m = 0.5;
                var y = e[c];
                var v = e[g];
                if (!v || zl(v)) {
                    zv(Vv, p);
                } else {
                    if (zl(v) && !u) {
                        v = p;
                    }
                    q(Nv, v, y);
                    var _;
                    var x;
                    if ('x' === h || 'y' === h) {
                        var w = 'x' === h ? 0 : 1;
                        _ = Math.abs(p[w] - y[w]);
                        x = Math.abs(p[w] - v[w]);
                    } else {
                        _ = zu(p, y);
                        x = zu(p, v);
                    }
                    m = x / (x + _);
                    Bv(Vv, p, Nv, -l * (1 - m));
                }
                Ev(Fv, Fv, s);
                Rv(Fv, Fv, o);
                Ev(Vv, Vv, s);
                Rv(Vv, Vv, o);
                t.bezierCurveTo(Fv[0], Fv[1], Vv[0], Vv[1], p[0], p[1]);
                Bv(Fv, p, Nv, l * m);
            } else {
                t.lineTo(p[0], p[1]);
            }
            c = f;
            f += a;
        }
        return d;
    }
    function Wl(t, e) {
        var n = [1 / 0, 1 / 0];
        var i = [-1 / 0, -1 / 0];
        if (e) {
            for (var r = 0; r < t.length; r++) {
                var a = t[r];
                if (a[0] < n[0]) {
                    n[0] = a[0];
                }
                if (a[1] < n[1]) {
                    n[1] = a[1];
                }
                if (a[0] > i[0]) {
                    i[0] = a[0];
                }
                if (a[1] > i[1]) {
                    i[1] = a[1];
                }
            }
        }
        return {
            min: e ? n : i,
            max: e ? i : n
        };
    }
    function Hl(t, e) {
        if (t.length === e.length) {
            for (var n = 0; n < t.length; n++) {
                var i = t[n];
                var r = e[n];
                if (i[0] !== r[0] || i[1] !== r[1]) {
                    return;
                }
            }
            return true;
        }
    }
    function Gl(t) {
        return 'number' == typeof t ? t : t ? 0.5 : 0;
    }
    function ql(t) {
        var e = t.getGlobalExtent();
        if (t.onBand) {
            var n = t.getBandWidth() / 2 - 1;
            var i = e[1] > e[0] ? 1 : -1;
            e[0] += i * n;
            e[1] -= i * n;
        }
        return e;
    }
    function Xl(t, e, n) {
        if (!n.valueDim) {
            return [];
        }
        for (i = [], r = 0, a = e.count(), void 0; a > r; r++) {
            var i;
            var r;
            var a;
            i.push(Rl(n, t, e, r));
        }
        return i;
    }
    function Ul(t, e, n, i) {
        var r = ql(t.getAxis('x'));
        var a = ql(t.getAxis('y'));
        var o = t.getBaseAxis().isHorizontal();
        var s = Math.min(r[0], r[1]);
        var l = Math.min(a[0], a[1]);
        var h = Math.max(r[0], r[1]) - s;
        var u = Math.max(a[0], a[1]) - l;
        if (n) {
            s -= 0.5;
            h += 0.5;
            l -= 0.5;
            u += 0.5;
        } else {
            var c = i.get('lineStyle.width') || 2;
            var f = i.get('clipOverflow') ? c / 2 : Math.max(h, u);
            o ? ((l -= f), (u += 2 * f)) : ((s -= f), (h += 2 * f));
        }
        var d = new Od({
            shape: {
                x: s,
                y: l,
                width: h,
                height: u
            }
        });
        if (e) {
            d.shape[o ? 'width' : 'height'] = 0;
            Zr(
                d,
                {
                    shape: {
                        width: h,
                        height: u
                    }
                },
                i
            );
        }
        return d;
    }
    function Yl(t, e, n, i) {
        var r = t.getAngleAxis();
        var a = t.getRadiusAxis();
        var o = a.getExtent().slice();
        if (o[0] > o[1]) {
            o.reverse();
        }
        var s = r.getExtent();
        var l = Math.PI / 180;
        if (n) {
            o[0] -= 0.5;
            o[1] += 0.5;
        }
        var h = new Ad({
            shape: {
                cx: oa(t.cx, 1),
                cy: oa(t.cy, 1),
                r0: oa(o[0], 1),
                r: oa(o[1], 1),
                startAngle: -s[0] * l,
                endAngle: -s[1] * l,
                clockwise: r.inverse
            }
        });
        if (e) {
            h.shape.endAngle = -s[0] * l;
            Zr(
                h,
                {
                    shape: {
                        endAngle: -s[1] * l
                    }
                },
                i
            );
        }
        return h;
    }
    function jl(t, e, n, i) {
        return 'polar' === t.type ? Yl(t, e, n, i) : Ul(t, e, n, i);
    }
    function Zl(t, e, n) {
        for (i = e.getBaseAxis(), r = 'x' === i.dim || 'radius' === i.dim ? 0 : 1, a = [], o = 0, void 0; o < t.length - 1; o++) {
            var i;
            var r;
            var a;
            var o;
            var s = t[o + 1];
            var l = t[o];
            a.push(l);
            var h = [];
            switch (n) {
                case 'end':
                    h[r] = s[r];
                    h[1 - r] = l[1 - r];
                    a.push(h);
                    break;
                case 'middle':
                    var u = (l[r] + s[r]) / 2;
                    var c = [];
                    h[r] = c[r] = u;
                    h[1 - r] = l[1 - r];
                    c[1 - r] = s[1 - r];
                    a.push(h);
                    a.push(c);
                    break;
                default:
                    h[r] = l[r];
                    h[1 - r] = s[1 - r];
                    a.push(h);
            }
        }
        if (t[o]) {
            a.push(t[o]);
        }
        return a;
    }
    function $l(t, e) {
        var n = t.getVisual('visualMeta');
        if (n && n.length && t.count() && 'cartesian2d' === e.type) {
            for (a = n.length - 1, void 0; a >= 0; a--) {
                var i;
                var r;
                var a;
                var o = n[a].dimension;
                var s = t.dimensions[o];
                var l = t.getDimensionInfo(s);
                i = l && l.coordDim;
                if ('x' === i || 'y' === i) {
                    r = n[a];
                    break;
                }
            }
            if (r) {
                var h = e.getAxis(i);
                var u = p(r.stops, function (t) {
                    return {
                        coord: h.toGlobalCoord(h.dataToCoord(t.value)),
                        color: t.color
                    };
                });
                var c = u.length;
                var f = r.outerColors.slice();
                if (c && u[0].coord > u[c - 1].coord) {
                    u.reverse();
                    f.reverse();
                }
                var g = 10;
                var v = u[0].coord - g;
                var m = u[c - 1].coord + g;
                var y = m - v;
                if (0.001 > y) {
                    return 'transparent';
                }
                d(u, function (t) {
                    t.offset = (t.coord - v) / y;
                });
                u.push({
                    offset: c ? u[c - 1].offset : 0.5,
                    color: f[1] || 'transparent'
                });
                u.unshift({
                    offset: c ? u[0].offset : 0.5,
                    color: f[0] || 'transparent'
                });
                var _ = new Nd(0, 0, 0, 0, u, true);
                _[i] = v;
                _[i + '2'] = m;
                return _;
            }
        }
    }
    function Kl(t, e, n) {
        var i = t.get('showAllSymbol');
        var r = 'auto' === i;
        if (!i || r) {
            var a = n.getAxesByScale('ordinal')[0];
            if (a && (!r || !Ql(a, e))) {
                var o = e.mapDimension(a.dim);
                var s = {};
                d(a.getViewLabels(), function (t) {
                    s[t.tickValue] = 1;
                });
                return function (t) {
                    return !s.hasOwnProperty(e.get(o, t));
                };
            }
        }
    }
    function Ql(t, e) {
        var n = t.getExtent();
        var i = Math.abs(n[1] - n[0]) / t.scale.count();
        if (isNaN(i)) {
            i = 0;
        }
        for (r = e.count(), a = Math.max(1, Math.round(r / 5)), o = 0, void 0; r > o; o += a) {
            var r;
            var a;
            var o;
            if (1.5 * Tl.getSymbolSize(e, o)[t.isHorizontal() ? 1 : 0] > i) {
                return false;
            }
        }
        return true;
    }
    function Jl(t) {
        this._setting = t || {};
        this._extent = [1 / 0, -1 / 0];
        this._interval = 0;
        if (this.init) {
            this.init.apply(this, arguments);
        }
    }
    function th(t) {
        this.categories = t.categories || [];
        this._needCollect = t.needCollect;
        this._deduplication = t.deduplication;
        this._map;
    }
    function eh(t) {
        return t._map || (t._map = z(t.categories));
    }
    function nh(t) {
        return b(t) && null != t.value ? t.value : t + '';
    }
    function ih(t, e, n, i) {
        var r = {};
        var a = t[1] - t[0];
        var o = (r.interval = pa(a / e, true));
        if (null != n && n > o) {
            o = r.interval = n;
        }
        if (null != i && o > i) {
            o = r.interval = i;
        }
        var s = (r.intervalPrecision = rh(o));
        var l = (r.niceTickExtent = [Kv(Math.ceil(t[0] / o) * o, s), Kv(Math.floor(t[1] / o) * o, s)]);
        oh(l, t);
        return r;
    }
    function rh(t) {
        return sa(t) + 2;
    }
    function ah(t, e, n) {
        t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
    }
    function oh(t, e) {
        if (!isFinite(t[0])) {
            t[0] = e[0];
        }
        if (!isFinite(t[1])) {
            t[1] = e[1];
        }
        ah(t, 0, e);
        ah(t, 1, e);
        if (t[0] > t[1]) {
            t[0] = t[1];
        }
    }
    function sh(t, e, n, i) {
        var r = [];
        if (!t) {
            return r;
        }
        var a = 10000;
        if (e[0] < n[0]) {
            r.push(e[0]);
        }
        for (var o = n[0]; o <= n[1] && (r.push(o), (o = Kv(o + t, i)), o !== r[r.length - 1]); ) {
            if (r.length > a) {
                return [];
            }
        }
        if (e[1] > (r.length ? r[r.length - 1] : n[1])) {
            r.push(e[1]);
        }
        return r;
    }
    function lh(t) {
        return t.get('stack') || tm + t.seriesIndex;
    }
    function hh(t) {
        return t.dim + t.index;
    }
    function uh(t, e) {
        var n = [];
        e.eachSeriesByType(t, function (t) {
            if (ph(t) && !gh(t)) {
                n.push(t);
            }
        });
        return n;
    }
    function ch(t) {
        var e = [];
        d(t, function (t) {
            var n = t.getData();
            var i = t.coordinateSystem;
            var r = i.getBaseAxis();
            var a = r.getExtent();
            var o = 'category' === r.type ? r.getBandWidth() : Math.abs(a[1] - a[0]) / n.count();
            var s = aa(t.get('barWidth'), o);
            var l = aa(t.get('barMaxWidth'), o);
            var h = t.get('barGap');
            var u = t.get('barCategoryGap');
            e.push({
                bandWidth: o,
                barWidth: s,
                barMaxWidth: l,
                barGap: h,
                barCategoryGap: u,
                axisKey: hh(r),
                stackId: lh(t)
            });
        });
        return fh(e);
    }
    function fh(t) {
        var e = {};
        d(t, function (t) {
            var n = t.axisKey;
            var i = t.bandWidth;
            var r = e[n] || {
                bandWidth: i,
                remainedWidth: i,
                autoWidthCount: 0,
                categoryGap: '20%',
                gap: '30%',
                stacks: {}
            };
            var a = r.stacks;
            e[n] = r;
            var o = t.stackId;
            a[o] || r.autoWidthCount++;
            a[o] = a[o] || {
                width: 0,
                maxWidth: 0
            };
            var s = t.barWidth;
            if (s && !a[o].width) {
                a[o].width = s;
                s = Math.min(r.remainedWidth, s);
                r.remainedWidth -= s;
            }
            var l = t.barMaxWidth;
            if (l) {
                a[o].maxWidth = l;
            }
            var h = t.barGap;
            if (null != h) {
                r.gap = h;
            }
            var u = t.barCategoryGap;
            if (null != u) {
                r.categoryGap = u;
            }
        });
        var n = {};
        d(e, function (t, e) {
            n[e] = {};
            var i = t.stacks;
            var r = t.bandWidth;
            var a = aa(t.categoryGap, r);
            var o = aa(t.gap, 1);
            var s = t.remainedWidth;
            var l = t.autoWidthCount;
            var h = (s - a) / (l + (l - 1) * o);
            h = Math.max(h, 0);
            d(i, function (t) {
                var e = t.maxWidth;
                if (e && h > e) {
                    e = Math.min(e, s);
                    if (t.width) {
                        e = Math.min(e, t.width);
                    }
                    s -= e;
                    t.width = e;
                    l--;
                }
            });
            h = (s - a) / (l + (l - 1) * o);
            h = Math.max(h, 0);
            var u;
            var c = 0;
            d(i, function (t) {
                t.width || (t.width = h);
                u = t;
                c += t.width * (1 + o);
            });
            if (u) {
                c -= u.width * o;
            }
            var f = -c / 2;
            d(i, function (t, i) {
                n[e][i] = n[e][i] || {
                    offset: f,
                    width: t.width
                };
                f += t.width * (1 + o);
            });
        });
        return n;
    }
    function dh(t, e, n) {
        if (t && e) {
            var i = t[hh(e)];
            if (null != i && null != n) {
                i = i[lh(n)];
            }
            return i;
        }
    }
    function ph(t) {
        return t.coordinateSystem && 'cartesian2d' === t.coordinateSystem.type;
    }
    function gh(t) {
        return t.pipelineContext && t.pipelineContext.large;
    }
    function vh(t, e, n) {
        return h(t.getAxesOnZeroOf(), e) >= 0 || n ? e.toGlobalCoord(e.dataToCoord(0)) : e.getGlobalExtent()[0];
    }
    function mh(t, e) {
        return vm(t, gm(e));
    }
    function yh(t, e) {
        var n;
        var i;
        var r;
        var a = t.type;
        var o = e.getMin();
        var s = e.getMax();
        var l = null != o;
        var h = null != s;
        var u = t.getExtent();
        'ordinal' === a
            ? (n = e.getCategories().length)
            : ((i = e.get('boundaryGap')),
              _(i) || (i = [i || 0, i || 0]),
              'boolean' == typeof i[0] && (i = [0, 0]),
              (i[0] = aa(i[0], 1)),
              (i[1] = aa(i[1], 1)),
              (r = u[1] - u[0] || Math.abs(u[0])));
        if (null == o) {
            o = 'ordinal' === a ? (n ? 0 : 0 / 0) : u[0] - i[0] * r;
        }
        if (null == s) {
            s = 'ordinal' === a ? (n ? n - 1 : 0 / 0) : u[1] + i[1] * r;
        }
        'dataMin' === o
            ? (o = u[0])
            : 'function' == typeof o &&
              (o = o({
                  min: u[0],
                  max: u[1]
              }));
        'dataMax' === s
            ? (s = u[1])
            : 'function' == typeof s &&
              (s = s({
                  min: u[0],
                  max: u[1]
              }));
        if (null == o || !isFinite(o)) {
            o = 0 / 0;
        }
        if (null == s || !isFinite(s)) {
            s = 0 / 0;
        }
        t.setBlank(T(o) || T(s) || ('ordinal' === a && !t.getOrdinalMeta().categories.length));
        if (e.getNeedCrossZero()) {
            if (o > 0 && s > 0 && !l) {
                o = 0;
            }
            if (0 > o && 0 > s && !h) {
                s = 0;
            }
        }
        var c = e.ecModel;
        if (c && 'time' === a) {
            var f;
            var p = uh('bar', c);
            d(p, function (t) {
                f |= t.getBaseAxis() === e.axis;
            });
            if (f) {
                var g = ch(p);
                var v = _h(o, s, e, g);
                o = v.min;
                s = v.max;
            }
        }
        return [o, s];
    }
    function _h(t, e, n, i) {
        var r = n.axis.getExtent();
        var a = r[1] - r[0];
        var o = dh(i, n.axis);
        if (void 0 === o) {
            return {
                min: t,
                max: e
            };
        }
        var s = 1 / 0;
        d(o, function (t) {
            s = Math.min(t.offset, s);
        });
        var l = -1 / 0;
        d(o, function (t) {
            l = Math.max(t.offset + t.width, l);
        });
        s = Math.abs(s);
        l = Math.abs(l);
        var h = s + l;
        var u = e - t;
        var c = 1 - (s + l) / a;
        var f = u / c - u;
        e += f * (l / h);
        t -= f * (s / h);
        return {
            min: t,
            max: e
        };
    }
    function xh(t, e) {
        var n = yh(t, e);
        var i = null != e.getMin();
        var r = null != e.getMax();
        var a = e.get('splitNumber');
        if ('log' === t.type) {
            t.base = e.get('logBase');
        }
        var o = t.type;
        t.setExtent(n[0], n[1]);
        t.niceExtent({
            splitNumber: a,
            fixMin: i,
            fixMax: r,
            minInterval: 'interval' === o || 'time' === o ? e.get('minInterval') : null,
            maxInterval: 'interval' === o || 'time' === o ? e.get('maxInterval') : null
        });
        var s = e.get('interval');
        if (null != s && t.setInterval) {
            t.setInterval(s);
        }
    }
    function wh(t, e) {
        if ((e = e || t.get('type'))) {
            switch (e) {
                case 'category':
                    return new $v(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]);
                case 'value':
                    return new Jv();
                default:
                    return (Jl.getClass(e) || Jv).create(t);
            }
        }
    }
    function bh(t) {
        var e = t.scale.getExtent();
        var n = e[0];
        var i = e[1];
        return !((n > 0 && i > 0) || (0 > n && 0 > i));
    }
    function Mh(t) {
        var e = t.getLabelModel().get('formatter');
        var n = 'category' === t.type ? t.scale.getExtent()[0] : null;
        return 'string' == typeof e
            ? (e = (function (t) {
                  return function (e) {
                      return t.replace('{value}', null != e ? e : '');
                  };
              })(e))
            : 'function' == typeof e
            ? function (i, r) {
                  if (null != n) {
                      r = i - n;
                  }
                  return e(Sh(t, i), r);
              }
            : function (e) {
                  return t.scale.getLabel(e);
              };
    }
    function Sh(t, e) {
        return 'category' === t.type ? t.scale.getLabel(e) : e;
    }
    function Ch(t) {
        var e = t.model;
        var n = t.scale;
        if (e.get('axisLabel.show') && !n.isBlank()) {
            var i;
            var r;
            var a = 'category' === t.type;
            var o = n.getExtent();
            a ? (r = n.count()) : ((i = n.getTicks()), (r = i.length));
            var s;
            var l = t.getLabelModel();
            var h = Mh(t);
            var u = 1;
            if (r > 40) {
                u = Math.ceil(r / 40);
            }
            for (var c = 0; r > c; c += u) {
                var f = i ? i[c] : o[0] + c;
                var d = h(f);
                var p = l.getTextRect(d);
                var g = Th(p, l.get('rotate') || 0);
                s ? s.union(g) : (s = g);
            }
            return s;
        }
    }
    function Th(t, e) {
        var n = (e * Math.PI) / 180;
        var i = t.plain();
        var r = i.width;
        var a = i.height;
        var o = r * Math.cos(n) + a * Math.sin(n);
        var s = r * Math.sin(n) + a * Math.cos(n);
        var l = new Ve(i.x, i.y, o, s);
        return l;
    }
    function kh(t) {
        return this._axes[t];
    }
    function Dh(t) {
        bm.call(this, t);
    }
    function Ih(t) {
        return 'category' === t.type ? Lh(t) : Eh(t);
    }
    function Ah(t, e) {
        return 'category' === t.type
            ? Oh(t, e)
            : {
                  ticks: t.scale.getTicks()
              };
    }
    function Lh(t) {
        var e = t.getLabelModel();
        var n = Ph(t, e);
        return !e.get('show') || t.scale.isBlank()
            ? {
                  labels: [],
                  labelCategoryInterval: n.labelCategoryInterval
              }
            : n;
    }
    function Ph(t, e) {
        var n = Rh(t, 'labels');
        var i = Gh(e);
        var r = Bh(n, i);
        if (r) {
            return r;
        }
        var a;
        var o;
        x(i) ? (a = Hh(t, i)) : ((o = 'auto' === i ? Nh(t) : i), (a = Wh(t, o)));
        return zh(n, i, {
            labels: a,
            labelCategoryInterval: o
        });
    }
    function Oh(t, e) {
        var n = Rh(t, 'ticks');
        var i = Gh(e);
        var r = Bh(n, i);
        if (r) {
            return r;
        }
        var a;
        var o;
        if (!e.get('show') || t.scale.isBlank()) {
            a = [];
        }
        if (x(i)) a = Hh(t, i, true);
        else if ('auto' === i) {
            var s = Ph(t, t.getLabelModel());
            o = s.labelCategoryInterval;
            a = p(s.labels, function (t) {
                return t.tickValue;
            });
        } else {
            o = i;
            a = Wh(t, o, true);
        }
        return zh(n, i, {
            ticks: a,
            tickCategoryInterval: o
        });
    }
    function Eh(t) {
        var e = t.scale.getTicks();
        var n = Mh(t);
        return {
            labels: p(e, function (e, i) {
                return {
                    formattedLabel: n(e, i),
                    rawLabel: t.scale.getLabel(e),
                    tickValue: e
                };
            })
        };
    }
    function Rh(t, e) {
        return Mm(t)[e] || (Mm(t)[e] = []);
    }
    function Bh(t, e) {
        for (var n = 0; n < t.length; n++) {
            if (t[n].key === e) {
                return t[n].value;
            }
        }
    }
    function zh(t, e, n) {
        t.push({
            key: e,
            value: n
        });
        return n;
    }
    function Nh(t) {
        var e = Mm(t).autoInterval;
        return null != e ? e : (Mm(t).autoInterval = t.calculateCategoryInterval());
    }
    function Fh(t) {
        var e = Vh(t);
        var n = Mh(t);
        var i = ((e.axisRotate - e.labelRotate) / 180) * Math.PI;
        var r = t.scale;
        var a = r.getExtent();
        var o = r.count();
        if (a[1] - a[0] < 1) {
            return 0;
        }
        var s = 1;
        if (o > 40) {
            s = Math.max(1, Math.floor(o / 40));
        }
        for (l = a[0], h = t.dataToCoord(l + 1) - t.dataToCoord(l), u = Math.abs(h * Math.cos(i)), c = Math.abs(h * Math.sin(i)), f = 0, d = 0, void 0; l <= a[1]; l += s) {
            var l;
            var h;
            var u;
            var c;
            var f;
            var d;
            var p = 0;
            var g = 0;
            var v = on(n(l), e.font, 'center', 'top');
            p = 1.3 * v.width;
            g = 1.3 * v.height;
            f = Math.max(f, p, 7);
            d = Math.max(d, g, 7);
        }
        var m = f / u;
        var y = d / c;
        if (isNaN(m)) {
            m = 1 / 0;
        }
        if (isNaN(y)) {
            y = 1 / 0;
        }
        var _ = Math.max(0, Math.floor(Math.min(m, y)));
        var x = Mm(t.model);
        var w = x.lastAutoInterval;
        var b = x.lastTickCount;
        null != w && null != b && Math.abs(w - _) <= 1 && Math.abs(b - o) <= 1 && w > _ ? (_ = w) : ((x.lastTickCount = o), (x.lastAutoInterval = _));
        return _;
    }
    function Vh(t) {
        var e = t.getLabelModel();
        return {
            axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
            labelRotate: e.get('rotate') || 0,
            font: e.getFont()
        };
    }
    function Wh(t, e, n) {
        function i(t) {
            l.push(
                n
                    ? t
                    : {
                          formattedLabel: r(t),
                          rawLabel: a.getLabel(t),
                          tickValue: t
                      }
            );
        }
        var r = Mh(t);
        var a = t.scale;
        var o = a.getExtent();
        var s = t.getLabelModel();
        var l = [];
        var h = Math.max((e || 0) + 1, 1);
        var u = o[0];
        var c = a.count();
        if (0 !== u && h > 1 && c / h > 2) {
            u = Math.round(Math.ceil(u / h) * h);
        }
        var f = {
            min: s.get('showMinLabel'),
            max: s.get('showMaxLabel')
        };
        if (f.min && u !== o[0]) {
            i(o[0]);
        }
        for (var d = u; d <= o[1]; d += h) {
            i(d);
        }
        if (f.max && d !== o[1]) {
            i(o[1]);
        }
        return l;
    }
    function Hh(t, e, n) {
        var i = t.scale;
        var r = Mh(t);
        var a = [];
        d(i.getTicks(), function (t) {
            var o = i.getLabel(t);
            if (e(t, o)) {
                a.push(
                    n
                        ? t
                        : {
                              formattedLabel: r(t),
                              rawLabel: o,
                              tickValue: t
                          }
                );
            }
        });
        return a;
    }
    function Gh(t) {
        var e = t.get('interval');
        return null == e ? 'auto' : e;
    }
    function qh(t, e) {
        var n = t[1] - t[0];
        var i = e;
        var r = n / i / 2;
        t[0] += r;
        t[1] -= r;
    }
    function Xh(t, e, n, i, r) {
        function a(t, e) {
            return u ? t > e : e > t;
        }
        var o = e.length;
        if (t.onBand && !i && o) {
            var s;
            var l = t.getExtent();
            if (1 === o) {
                e[0].coord = l[0];
                s = e[1] = {
                    coord: l[0]
                };
            } else {
                var h = e[1].coord - e[0].coord;
                d(e, function (t) {
                    t.coord -= h / 2;
                    var e = e || 0;
                    if (e % 2 > 0) {
                        t.coord -= h / (2 * (e + 1));
                    }
                });
                s = {
                    coord: e[o - 1].coord + h
                };
                e.push(s);
            }
            var u = l[0] > l[1];
            if (a(e[0].coord, l[0])) {
                r ? (e[0].coord = l[0]) : e.shift();
            }
            if (r && a(l[0], e[0].coord)) {
                e.unshift({
                    coord: l[0]
                });
            }
            if (a(l[1], s.coord)) {
                r ? (s.coord = l[1]) : e.pop();
            }
            if (r && a(s.coord, l[1])) {
                e.push({
                    coord: l[1]
                });
            }
        }
    }
    function Uh(t, e) {
        return e.type || (e.data ? 'category' : 'value');
    }
    function Yh(t, e) {
        return t.getCoordSysModel() === e;
    }
    function jh(t, e, n) {
        this._coordsMap = {};
        this._coordsList = [];
        this._axesMap = {};
        this._axesList = [];
        this._initCartesian(t, e, n);
        this.model = t;
    }
    function Zh(t, e, n) {
        n.getAxesOnZeroOf = function () {
            return i ? [i] : [];
        };
        var i;
        var r = t[e];
        var a = n.model;
        var o = a.get('axisLine.onZero');
        var s = a.get('axisLine.onZeroAxisIndex');
        if (o) {
            if (null != s) {
                return void ($h(r[s]) && (i = r[s]));
            }
            for (var l in r) {
                if (r.hasOwnProperty(l) && $h(r[l])) {
                    i = r[l];
                    break;
                }
            }
        }
    }
    function $h(t) {
        return t && 'category' !== t.type && 'time' !== t.type && bh(t);
    }
    function Kh(t, e) {
        var n = t.getExtent();
        var i = n[0] + n[1];
        t.toGlobalCoord =
            'x' === t.dim
                ? function (t) {
                      return t + e;
                  }
                : function (t) {
                      return i - t + e;
                  };
        t.toLocalCoord =
            'x' === t.dim
                ? function (t) {
                      return t - e;
                  }
                : function (t) {
                      return i - t + e;
                  };
    }
    function Qh(t) {
        return p(Rm, function (e) {
            var n = t.getReferringComponents(e)[0];
            return n;
        });
    }
    function Jh(t) {
        return 'cartesian2d' === t.get('coordinateSystem');
    }
    function tu(t) {
        var e = {
            componentType: t.mainType
        };
        e[t.mainType + 'Index'] = t.componentIndex;
        return e;
    }
    function eu(t, e, n, i) {
        var r;
        var a;
        var o = ha(n - t.rotation);
        var s = i[0] > i[1];
        var l = ('start' === e && !s) || ('start' !== e && s);
        ua(o - Bm / 2)
            ? ((a = l ? 'bottom' : 'top'), (r = 'center'))
            : ua(o - 1.5 * Bm)
            ? ((a = l ? 'top' : 'bottom'), (r = 'center'))
            : ((a = 'middle'), (r = 1.5 * Bm > o && o > Bm / 2 ? (l ? 'left' : 'right') : l ? 'right' : 'left'));
        return {
            rotation: o,
            textAlign: r,
            textVerticalAlign: a
        };
    }
    function nu(t) {
        var e = t.get('tooltip');
        return t.get('silent') || !(t.get('triggerEvent') || (e && e.show));
    }
    function iu(t, e, n) {
        var i = t.get('axisLabel.showMinLabel');
        var r = t.get('axisLabel.showMaxLabel');
        e = e || [];
        n = n || [];
        var a = e[0];
        var o = e[1];
        var s = e[e.length - 1];
        var l = e[e.length - 2];
        var h = n[0];
        var u = n[1];
        var c = n[n.length - 1];
        var f = n[n.length - 2];
        i === false ? (ru(a), ru(h)) : au(a, o) && (i ? (ru(o), ru(u)) : (ru(a), ru(h)));
        r === false ? (ru(s), ru(c)) : au(l, s) && (r ? (ru(l), ru(f)) : (ru(s), ru(c)));
    }
    function ru(t) {
        if (t) {
            t.ignore = true;
        }
    }
    function au(t, e) {
        var n = t && t.getBoundingRect().clone();
        var i = e && e.getBoundingRect().clone();
        if (n && i) {
            var r = oe([]);
            ue(r, r, -t.rotation);
            n.applyTransform(le([], r, t.getLocalTransform()));
            i.applyTransform(le([], r, e.getLocalTransform()));
            return n.intersect(i);
        }
    }
    function ou(t) {
        return 'middle' === t || 'center' === t;
    }
    function su(t, e, n) {
        var i = e.axis;
        if (e.get('axisTick.show') && !i.scale.isBlank()) {
            for (
                r = e.getModel('axisTick'), a = r.getModel('lineStyle'), o = r.get('length'), l = i.getTicksCoords(), h = [], u = [], c = t._transform, f = [], d = 0, void 0;
                d < l.length;
                d++
            ) {
                var r;
                var a;
                var o;
                var l;
                var h;
                var u;
                var c;
                var f;
                var d;
                var p = l[d].coord;
                h[0] = p;
                h[1] = 0;
                u[0] = p;
                u[1] = n.tickDirection * o;
                if (c) {
                    K(h, h, c);
                    K(u, u, c);
                }
                var g = new Ed(
                    Mr({
                        anid: 'tick_' + l[d].tickValue,
                        shape: {
                            x1: h[0],
                            y1: h[1],
                            x2: u[0],
                            y2: u[1]
                        },
                        style: s(a.getLineStyle(), {
                            stroke: e.get('axisLine.lineStyle.color')
                        }),
                        z2: 2,
                        silent: true
                    })
                );
                t.group.add(g);
                f.push(g);
            }
            return f;
        }
    }
    function lu(t, e, n) {
        var i = e.axis;
        var r = k(n.axisLabelShow, e.get('axisLabel.show'));
        if (r && !i.scale.isBlank()) {
            var a = e.getModel('axisLabel');
            var o = a.get('margin');
            var s = i.getViewLabels();
            var l = ((k(n.labelRotate, a.get('rotate')) || 0) * Bm) / 180;
            var h = Fm(n.rotation, l, n.labelDirection);
            var u = e.getCategories(true);
            var c = [];
            var f = nu(e);
            var p = e.get('triggerEvent');
            d(s, function (r, s) {
                var l = r.tickValue;
                var d = r.formattedLabel;
                var g = r.rawLabel;
                var v = a;
                if (u && u[l] && u[l].textStyle) {
                    v = new Kr(u[l].textStyle, a, e.ecModel);
                }
                var m = v.getTextColor() || e.get('axisLine.lineStyle.color');
                var y = i.dataToCoord(l);
                var _ = [y, n.labelOffset + n.labelDirection * o];
                var x = new Td({
                    anid: 'label_' + l,
                    position: _,
                    rotation: h.rotation,
                    silent: f,
                    z2: 10
                });
                Fr(x.style, v, {
                    text: d,
                    textAlign: v.getShallow('align', true) || h.textAlign,
                    textVerticalAlign: v.getShallow('verticalAlign', true) || v.getShallow('baseline', true) || h.textVerticalAlign,
                    textFill: 'function' == typeof m ? m('category' === i.type ? g : 'value' === i.type ? l + '' : l, s) : m
                });
                if (p) {
                    x.eventData = tu(e);
                    x.eventData.targetType = 'axisLabel';
                    x.eventData.value = g;
                }
                t._dumbGroup.add(x);
                x.updateTransform();
                c.push(x);
                t.group.add(x);
                x.decomposeTransform();
            });
            return c;
        }
    }
    function hu(t) {
        var e = uu(t);
        if (e) {
            var n = e.axisPointerModel;
            var i = e.axis.scale;
            var r = n.option;
            var a = n.get('status');
            var o = n.get('value');
            if (null != o) {
                o = i.parse(o);
            }
            var s = fu(n);
            if (null == a) {
                r.status = s ? 'show' : 'hide';
            }
            var l = i.getExtent().slice();
            if (l[0] > l[1]) {
                l.reverse();
            }
            if (null == o || o > l[1]) {
                o = l[1];
            }
            if (o < l[0]) {
                o = l[0];
            }
            r.value = o;
            if (s) {
                r.status = e.axis.scale.isBlank() ? 'hide' : 'show';
            }
        }
    }
    function uu(t) {
        var e = (t.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;
        return e && e.axesInfo[du(t)];
    }
    function cu(t) {
        var e = uu(t);
        return e && e.axisPointerModel;
    }
    function fu(t) {
        return !!t.get('handle.show');
    }
    function du(t) {
        return t.type + '||' + t.id;
    }
    function pu(t, e, n, i, r, a) {
        var o = Vm.getAxisPointerClass(t.axisPointerClass);
        if (o) {
            var s = cu(e);
            s ? (t._axisPointer || (t._axisPointer = new o())).render(e, s, i, a) : gu(t, i);
        }
    }
    function gu(t, e, n) {
        var i = t._axisPointer;
        if (i) {
            i.dispose(e, n);
        }
        t._axisPointer = null;
    }
    function vu(t, e, n) {
        n = n || {};
        var i = t.coordinateSystem;
        var r = e.axis;
        var a = {};
        var o = r.getAxesOnZeroOf()[0];
        var s = r.position;
        var l = o ? 'onZero' : s;
        var h = r.dim;
        var u = i.getRect();
        var c = [u.x, u.x + u.width, u.y, u.y + u.height];
        var f = {
            left: 0,
            right: 1,
            top: 0,
            bottom: 1,
            onZero: 2
        };
        var d = e.get('offset') || 0;
        var p = 'x' === h ? [c[2] - d, c[3] + d] : [c[0] - d, c[1] + d];
        if (o) {
            var g = o.toGlobalCoord(o.dataToCoord(0));
            p[f.onZero] = Math.max(Math.min(g, p[1]), p[0]);
        }
        a.position = ['y' === h ? p[f[l]] : c[0], 'x' === h ? p[f[l]] : c[3]];
        a.rotation = (Math.PI / 2) * ('x' === h ? 0 : 1);
        var v = {
            top: -1,
            bottom: 1,
            left: -1,
            right: 1
        };
        a.labelDirection = a.tickDirection = a.nameDirection = v[s];
        a.labelOffset = o ? p[f[s]] - p[f.onZero] : 0;
        if (e.get('axisTick.inside')) {
            a.tickDirection = -a.tickDirection;
        }
        if (k(n.labelInside, e.get('axisLabel.inside'))) {
            a.labelDirection = -a.labelDirection;
        }
        var m = e.get('axisLabel.rotate');
        a.labelRotate = 'top' === l ? -m : m;
        a.z2 = 1;
        return a;
    }
    function mu(t, e) {
        var n = t.get('center');
        var i = e.getWidth();
        var r = e.getHeight();
        var a = Math.min(i, r);
        var o = aa(n[0], e.getWidth());
        var s = aa(n[1], e.getHeight());
        var l = aa(t.get('radius'), a / 2);
        return {
            cx: o,
            cy: s,
            r: l
        };
    }
    function yu(t, e) {
        if (e) {
            'string' == typeof e ? (t = e.replace('{value}', null != t ? t : '')) : 'function' == typeof e && (t = e(t));
        }
        return t;
    }
    var _u = 2311;
    var xu = function () {
        return _u++;
    };
    var wu = {};
    wu =
        'object' == typeof wx && 'function' == typeof uni.getSystemInfoSync
            ? {
                  browser: {},
                  os: {},
                  node: false,
                  wxa: true,
                  canvasSupported: true,
                  svgSupported: false,
                  touchEventsSupported: true
              }
            : 'undefined' == typeof document && 'undefined' != typeof self
            ? {
                  browser: {},
                  os: {},
                  node: false,
                  worker: true,
                  canvasSupported: true
              }
            : 'undefined' == typeof navigator
            ? {
                  browser: {},
                  os: {},
                  node: true,
                  worker: false,
                  canvasSupported: true,
                  svgSupported: true
              }
            : e(navigator.userAgent);
    var bu = wu;
    var Mu = {
        '[object Function]': 1,
        '[object RegExp]': 1,
        '[object Date]': 1,
        '[object Error]': 1,
        '[object CanvasGradient]': 1,
        '[object CanvasPattern]': 1,
        '[object Image]': 1,
        '[object Canvas]': 1
    };
    var Su = {
        '[object Int8Array]': 1,
        '[object Uint8Array]': 1,
        '[object Uint8ClampedArray]': 1,
        '[object Int16Array]': 1,
        '[object Uint16Array]': 1,
        '[object Int32Array]': 1,
        '[object Uint32Array]': 1,
        '[object Float32Array]': 1,
        '[object Float64Array]': 1
    };
    var Cu = Object.prototype.toString;
    var Tu = Array.prototype;
    var ku = Tu.forEach;
    var Du = Tu.filter;
    var Iu = Tu.slice;
    var Au = Tu.map;
    var Lu = Tu.reduce;
    var Pu = {};
    var Ou = function () {
        return Pu.createCanvas();
    };
    Pu.createCanvas = function () {
        return document.createElement('canvas');
    };
    var Eu;
    var Ru = '__ec_primitive__';
    B.prototype = {
        constructor: B,
        get: function (t) {
            return this.hasOwnProperty(t) ? this[t] : null;
        },
        set: function (t, e) {
            return (this[t] = e);
        },
        each: function (t, e) {
            if (void 0 !== e) {
                t = m(t, e);
            }
            for (var n in this) {
                if (this.hasOwnProperty(n)) {
                    t(this[n], n);
                }
            }
        },
        removeKey: function (t) {
            delete this[t];
        }
    };
    var Bu = 'undefined' == typeof Float32Array ? Array : Float32Array;
    var zu = Z;
    var Nu = $;
    te.prototype = {
        constructor: te,
        _dragStart: function (t) {
            var e = t.target;
            if (e && e.draggable) {
                this._draggingTarget = e;
                e.dragging = true;
                this._x = t.offsetX;
                this._y = t.offsetY;
                this.dispatchToElement(ee(e, t), 'dragstart', t.event);
            }
        },
        _drag: function (t) {
            var e = this._draggingTarget;
            if (e) {
                var n = t.offsetX;
                var i = t.offsetY;
                var r = n - this._x;
                var a = i - this._y;
                this._x = n;
                this._y = i;
                e.drift(r, a, t);
                this.dispatchToElement(ee(e, t), 'drag', t.event);
                var o = this.findHover(n, i, e).target;
                var s = this._dropTarget;
                this._dropTarget = o;
                if (e !== o) {
                    if (s && o !== s) {
                        this.dispatchToElement(ee(s, t), 'dragleave', t.event);
                    }
                    if (o && o !== s) {
                        this.dispatchToElement(ee(o, t), 'dragenter', t.event);
                    }
                }
            }
        },
        _dragEnd: function (t) {
            var e = this._draggingTarget;
            if (e) {
                e.dragging = false;
            }
            this.dispatchToElement(ee(e, t), 'dragend', t.event);
            if (this._dropTarget) {
                this.dispatchToElement(ee(this._dropTarget, t), 'drop', t.event);
            }
            this._draggingTarget = null;
            this._dropTarget = null;
        }
    };
    var Fu = Array.prototype.slice;
    var Vu = function () {
        this._$handlers = {};
    };
    Vu.prototype = {
        constructor: Vu,
        one: function (t, e, n) {
            var i = this._$handlers;
            if (!e || !t) {
                return this;
            }
            i[t] || (i[t] = []);
            for (var r = 0; r < i[t].length; r++) {
                if (i[t][r].h === e) {
                    return this;
                }
            }
            i[t].push({
                h: e,
                one: true,
                ctx: n || this
            });
            return this;
        },
        on: function (t, e, n) {
            var i = this._$handlers;
            if (!e || !t) {
                return this;
            }
            i[t] || (i[t] = []);
            for (var r = 0; r < i[t].length; r++) {
                if (i[t][r].h === e) {
                    return this;
                }
            }
            i[t].push({
                h: e,
                one: false,
                ctx: n || this
            });
            return this;
        },
        isSilent: function (t) {
            var e = this._$handlers;
            return e[t] && e[t].length;
        },
        off: function (t, e) {
            var n = this._$handlers;
            if (!t) {
                this._$handlers = {};
                return this;
            }
            if (e) {
                if (n[t]) {
                    for (i = [], r = 0, a = n[t].length, void 0; a > r; r++) {
                        var i;
                        var r;
                        var a;
                        if (n[t][r].h != e) {
                            i.push(n[t][r]);
                        }
                    }
                    n[t] = i;
                }
                if (n[t] && 0 === n[t].length) {
                    delete n[t];
                }
            } else {
                delete n[t];
            }
            return this;
        },
        trigger: function (t) {
            if (this._$handlers[t]) {
                var e = arguments;
                var n = e.length;
                if (n > 3) {
                    e = Fu.call(e, 1);
                }
                for (i = this._$handlers[t], r = i.length, a = 0, void 0; r > a; ) {
                    var i;
                    var r;
                    var a;
                    switch (n) {
                        case 1:
                            i[a].h.call(i[a].ctx);
                            break;
                        case 2:
                            i[a].h.call(i[a].ctx, e[1]);
                            break;
                        case 3:
                            i[a].h.call(i[a].ctx, e[1], e[2]);
                            break;
                        default:
                            i[a].h.apply(i[a].ctx, e);
                    }
                    i[a].one ? (i.splice(a, 1), r--) : a++;
                }
            }
            return this;
        },
        triggerWithContext: function (t) {
            if (this._$handlers[t]) {
                var e = arguments;
                var n = e.length;
                if (n > 4) {
                    e = Fu.call(e, 1, e.length - 1);
                }
                for (i = e[e.length - 1], r = this._$handlers[t], a = r.length, o = 0, void 0; a > o; ) {
                    var i;
                    var r;
                    var a;
                    var o;
                    switch (n) {
                        case 1:
                            r[o].h.call(i);
                            break;
                        case 2:
                            r[o].h.call(i, e[1]);
                            break;
                        case 3:
                            r[o].h.call(i, e[1], e[2]);
                            break;
                        default:
                            r[o].h.apply(i, e);
                    }
                    r[o].one ? (r.splice(o, 1), a--) : o++;
                }
            }
            return this;
        }
    };
    var Wu = 'silent';
    ie.prototype.dispose = function () {};
    var Hu = ['click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu'];
    var Gu = function (t, e, n, i) {
        Vu.call(this);
        this.storage = t;
        this.painter = e;
        this.painterRoot = i;
        n = n || new ie();
        this.proxy = null;
        this._hovered = {};
        this._lastTouchMoment;
        this._lastX;
        this._lastY;
        te.call(this);
        this.setHandlerProxy(n);
    };
    Gu.prototype = {
        constructor: Gu,
        setHandlerProxy: function (t) {
            if (this.proxy) {
                this.proxy.dispose();
            }
            if (t) {
                d(
                    Hu,
                    function (e) {
                        if (t.on) {
                            t.on(e, this[e], this);
                        }
                    },
                    this
                );
                t.handler = this;
            }
            this.proxy = t;
        },
        mousemove: function (t) {
            var e = t.zrX;
            var n = t.zrY;
            var i = this._hovered;
            var r = i.target;
            if (r && !r.__zr) {
                i = this.findHover(i.x, i.y);
                r = i.target;
            }
            var a = (this._hovered = this.findHover(e, n));
            var o = a.target;
            var s = this.proxy;
            if (s.setCursor) {
                s.setCursor(o ? o.cursor : 'default');
            }
            if (r && o !== r) {
                this.dispatchToElement(i, 'mouseout', t);
            }
            this.dispatchToElement(a, 'mousemove', t);
            if (o && o !== r) {
                this.dispatchToElement(a, 'mouseover', t);
            }
        },
        mouseout: function (t) {
            this.dispatchToElement(this._hovered, 'mouseout', t);
            var e;
            var n = t.toElement || t.relatedTarget;
            do n = n && n.parentNode;
            while (n && 9 != n.nodeType && !(e = n === this.painterRoot));
            if (!e) {
                this.trigger('globalout', {
                    event: t
                });
            }
        },
        resize: function () {
            this._hovered = {};
        },
        dispatch: function (t, e) {
            var n = this[t];
            if (n) {
                n.call(this, e);
            }
        },
        dispose: function () {
            this.proxy.dispose();
            this.storage = this.proxy = this.painter = null;
        },
        setCursorStyle: function (t) {
            var e = this.proxy;
            if (e.setCursor) {
                e.setCursor(t);
            }
        },
        dispatchToElement: function (t, e, n) {
            t = t || {};
            var i = t.target;
            if (!i || !i.silent) {
                for (r = 'on' + e, a = ne(e, t, n), void 0; i && (i[r] && (a.cancelBubble = i[r].call(i, a)), i.trigger(e, a), (i = i.parent), !a.cancelBubble); ) {
                    var r;
                    var a;
                }
                a.cancelBubble ||
                    (this.trigger(e, a),
                    this.painter &&
                        this.painter.eachOtherLayer(function (t) {
                            if ('function' == typeof t[r]) {
                                t[r].call(t, a);
                            }
                            if (t.trigger) {
                                t.trigger(e, a);
                            }
                        }));
            }
        },
        findHover: function (t, e, n) {
            for (
                i = this.storage.getDisplayList(),
                    r = {
                        x: t,
                        y: e
                    },
                    a = i.length - 1,
                    void 0;
                a >= 0;
                a--
            ) {
                var i;
                var r;
                var a;
                var o;
                if (i[a] !== n && !i[a].ignore && (o = re(i[a], t, e)) && (!r.topTarget && (r.topTarget = i[a]), o !== Wu)) {
                    r.target = i[a];
                    break;
                }
            }
            return r;
        }
    };
    d(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (t) {
        Gu.prototype[t] = function (e) {
            var n = this.findHover(e.zrX, e.zrY);
            var i = n.target;
            if ('mousedown' === t) {
                this._downEl = i;
                this._downPoint = [e.zrX, e.zrY];
                this._upEl = i;
            } else if ('mouseup' === t) this._upEl = i;
            else if ('click' === t) {
                if (this._downEl !== this._upEl || !this._downPoint || zu(this._downPoint, [e.zrX, e.zrY]) > 4) {
                    return;
                }
                this._downPoint = null;
            }
            this.dispatchToElement(n, t, e);
        };
    });
    c(Gu, Vu);
    c(Gu, te);
    var qu = 'undefined' == typeof Float32Array ? Array : Float32Array;
    var Xu = oe;
    var Uu = 0.00005;
    var Yu = function (t) {
        t = t || {};
        t.position || (this.position = [0, 0]);
        if (null == t.rotation) {
            this.rotation = 0;
        }
        t.scale || (this.scale = [1, 1]);
        this.origin = this.origin || null;
    };
    var ju = Yu.prototype;
    ju.transform = null;
    ju.needLocalTransform = function () {
        return de(this.rotation) || de(this.position[0]) || de(this.position[1]) || de(this.scale[0] - 1) || de(this.scale[1] - 1);
    };
    ju.updateTransform = function () {
        var t = this.parent;
        var e = t && t.transform;
        var n = this.needLocalTransform();
        var i = this.transform;
        return n || e
            ? ((i = i || ae()),
              n ? this.getLocalTransform(i) : Xu(i),
              e && (n ? le(i, t.transform, i) : se(i, t.transform)),
              (this.transform = i),
              (this.invTransform = this.invTransform || ae()),
              void fe(this.invTransform, i))
            : void (i && Xu(i));
    };
    ju.getLocalTransform = function (t) {
        return Yu.getLocalTransform(this, t);
    };
    ju.setTransform = function (t) {
        var e = this.transform;
        var n = t.dpr || 1;
        e ? t.setTransform(n * e[0], n * e[1], n * e[2], n * e[3], n * e[4], n * e[5]) : t.setTransform(n, 0, 0, n, 0, 0);
    };
    ju.restoreTransform = function (t) {
        var e = t.dpr || 1;
        t.setTransform(e, 0, 0, e, 0, 0);
    };
    var Zu = [];
    ju.decomposeTransform = function () {
        if (this.transform) {
            var t = this.parent;
            var e = this.transform;
            if (t && t.transform) {
                le(Zu, t.invTransform, e);
                e = Zu;
            }
            var n = e[0] * e[0] + e[1] * e[1];
            var i = e[2] * e[2] + e[3] * e[3];
            var r = this.position;
            var a = this.scale;
            if (de(n - 1)) {
                n = Math.sqrt(n);
            }
            if (de(i - 1)) {
                i = Math.sqrt(i);
            }
            if (e[0] < 0) {
                n = -n;
            }
            if (e[3] < 0) {
                i = -i;
            }
            r[0] = e[4];
            r[1] = e[5];
            a[0] = n;
            a[1] = i;
            this.rotation = Math.atan2(-e[1] / i, e[0] / n);
        }
    };
    ju.getGlobalScale = function () {
        var t = this.transform;
        if (!t) {
            return [1, 1];
        }
        var e = Math.sqrt(t[0] * t[0] + t[1] * t[1]);
        var n = Math.sqrt(t[2] * t[2] + t[3] * t[3]);
        if (t[0] < 0) {
            e = -e;
        }
        if (t[3] < 0) {
            n = -n;
        }
        return [e, n];
    };
    ju.transformCoordToLocal = function (t, e) {
        var n = [t, e];
        var i = this.invTransform;
        if (i) {
            K(n, n, i);
        }
        return n;
    };
    ju.transformCoordToGlobal = function (t, e) {
        var n = [t, e];
        var i = this.transform;
        if (i) {
            K(n, n, i);
        }
        return n;
    };
    Yu.getLocalTransform = function (t, e) {
        e = e || [];
        Xu(e);
        var n = t.origin;
        var i = t.scale || [1, 1];
        var r = t.rotation || 0;
        var a = t.position || [0, 0];
        if (n) {
            e[4] -= n[0];
            e[5] -= n[1];
        }
        ce(e, e, i);
        if (r) {
            ue(e, e, r);
        }
        if (n) {
            e[4] += n[0];
            e[5] += n[1];
        }
        e[4] += a[0];
        e[5] += a[1];
        return e;
    };
    var $u = {
        linear: function (t) {
            return t;
        },
        quadraticIn: function (t) {
            return t * t;
        },
        quadraticOut: function (t) {
            return t * (2 - t);
        },
        quadraticInOut: function (t) {
            return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
        },
        cubicIn: function (t) {
            return t * t * t;
        },
        cubicOut: function (t) {
            return --t * t * t + 1;
        },
        cubicInOut: function (t) {
            return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
        },
        quarticIn: function (t) {
            return t * t * t * t;
        },
        quarticOut: function (t) {
            return 1 - --t * t * t * t;
        },
        quarticInOut: function (t) {
            return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
        },
        quinticIn: function (t) {
            return t * t * t * t * t;
        },
        quinticOut: function (t) {
            return --t * t * t * t * t + 1;
        },
        quinticInOut: function (t) {
            return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
        },
        sinusoidalIn: function (t) {
            return 1 - Math.cos((t * Math.PI) / 2);
        },
        sinusoidalOut: function (t) {
            return Math.sin((t * Math.PI) / 2);
        },
        sinusoidalInOut: function (t) {
            return 0.5 * (1 - Math.cos(Math.PI * t));
        },
        exponentialIn: function (t) {
            return 0 === t ? 0 : Math.pow(1024, t - 1);
        },
        exponentialOut: function (t) {
            return 1 === t ? 1 : 1 - Math.pow(2, -10 * t);
        },
        exponentialInOut: function (t) {
            return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
        },
        circularIn: function (t) {
            return 1 - Math.sqrt(1 - t * t);
        },
        circularOut: function (t) {
            return Math.sqrt(1 - --t * t);
        },
        circularInOut: function (t) {
            return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
        },
        elasticIn: function (t) {
            var e;
            var n = 0.1;
            var i = 0.4;
            return 0 === t
                ? 0
                : 1 === t
                ? 1
                : (!n || 1 > n ? ((n = 1), (e = i / 4)) : (e = (i * Math.asin(1 / n)) / (2 * Math.PI)), -(n * Math.pow(2, 10 * (t -= 1)) * Math.sin((2 * (t - e) * Math.PI) / i)));
        },
        elasticOut: function (t) {
            var e;
            var n = 0.1;
            var i = 0.4;
            return 0 === t
                ? 0
                : 1 === t
                ? 1
                : (!n || 1 > n ? ((n = 1), (e = i / 4)) : (e = (i * Math.asin(1 / n)) / (2 * Math.PI)), n * Math.pow(2, -10 * t) * Math.sin((2 * (t - e) * Math.PI) / i) + 1);
        },
        elasticInOut: function (t) {
            var e;
            var n = 0.1;
            var i = 0.4;
            return 0 === t
                ? 0
                : 1 === t
                ? 1
                : (!n || 1 > n ? ((n = 1), (e = i / 4)) : (e = (i * Math.asin(1 / n)) / (2 * Math.PI)),
                  (t *= 2) < 1
                      ? -0.5 * n * Math.pow(2, 10 * (t -= 1)) * Math.sin((2 * (t - e) * Math.PI) / i)
                      : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((2 * (t - e) * Math.PI) / i) * 0.5 + 1);
        },
        backIn: function (t) {
            var e = 1.70158;
            return t * t * ((e + 1) * t - e);
        },
        backOut: function (t) {
            var e = 1.70158;
            return --t * t * ((e + 1) * t + e) + 1;
        },
        backInOut: function (t) {
            var e = 2.5949095;
            return (t *= 2) < 1 ? 0.5 * t * t * ((e + 1) * t - e) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
        },
        bounceIn: function (t) {
            return 1 - $u.bounceOut(1 - t);
        },
        bounceOut: function (t) {
            return 0.36363636363636365 > t
                ? 7.5625 * t * t
                : 0.7272727272727273 > t
                ? 7.5625 * (t -= 0.5454545454545454) * t + 0.75
                : 0.9090909090909091 > t
                ? 7.5625 * (t -= 0.8181818181818182) * t + 0.9375
                : 7.5625 * (t -= 0.9545454545454546) * t + 0.984375;
        },
        bounceInOut: function (t) {
            return 0.5 > t ? 0.5 * $u.bounceIn(2 * t) : 0.5 * $u.bounceOut(2 * t - 1) + 0.5;
        }
    };
    pe.prototype = {
        constructor: pe,
        step: function (t, e) {
            this._initialized || ((this._startTime = t + this._delay), (this._initialized = true));
            if (this._paused) {
                return void (this._pausedTime += e);
            }
            var n = (t - this._startTime - this._pausedTime) / this._life;
            if (!(0 > n)) {
                n = Math.min(n, 1);
                var i = this.easing;
                var r = 'string' == typeof i ? $u[i] : i;
                var a = 'function' == typeof r ? r(n) : n;
                this.fire('frame', a);
                return 1 == n ? (this.loop ? (this.restart(t), 'restart') : ((this._needsRemove = true), 'destroy')) : null;
            }
        },
        restart: function (t) {
            var e = (t - this._startTime - this._pausedTime) % this._life;
            this._startTime = t - e + this.gap;
            this._pausedTime = 0;
            this._needsRemove = false;
        },
        fire: function (t, e) {
            t = 'on' + t;
            if (this[t]) {
                this[t](this._target, e);
            }
        },
        pause: function () {
            this._paused = true;
        },
        resume: function () {
            this._paused = false;
        }
    };
    var Ku = function () {
        this.head = null;
        this.tail = null;
        this._len = 0;
    };
    var Qu = Ku.prototype;
    Qu.insert = function (t) {
        var e = new Ju(t);
        this.insertEntry(e);
        return e;
    };
    Qu.insertEntry = function (t) {
        this.head ? ((this.tail.next = t), (t.prev = this.tail), (t.next = null), (this.tail = t)) : (this.head = this.tail = t);
        this._len++;
    };
    Qu.remove = function (t) {
        var e = t.prev;
        var n = t.next;
        e ? (e.next = n) : (this.head = n);
        n ? (n.prev = e) : (this.tail = e);
        t.next = t.prev = null;
        this._len--;
    };
    Qu.len = function () {
        return this._len;
    };
    Qu.clear = function () {
        this.head = this.tail = null;
        this._len = 0;
    };
    var Ju = function (t) {
        this.value = t;
        this.next;
        this.prev;
    };
    var tc = function (t) {
        this._list = new Ku();
        this._map = {};
        this._maxSize = t || 10;
        this._lastRemovedEntry = null;
    };
    var ec = tc.prototype;
    ec.put = function (t, e) {
        var n = this._list;
        var i = this._map;
        var r = null;
        if (null == i[t]) {
            var a = n.len();
            var o = this._lastRemovedEntry;
            if (a >= this._maxSize && a > 0) {
                var s = n.head;
                n.remove(s);
                delete i[s.key];
                r = s.value;
                this._lastRemovedEntry = s;
            }
            o ? (o.value = e) : (o = new Ju(e));
            o.key = t;
            n.insertEntry(o);
            i[t] = o;
        }
        return r;
    };
    ec.get = function (t) {
        var e = this._map[t];
        var n = this._list;
        return null != e ? (e !== n.tail && (n.remove(e), n.insertEntry(e)), e.value) : void 0;
    };
    ec.clear = function () {
        this._list.clear();
        this._map = {};
    };
    var nc = {
        transparent: [0, 0, 0, 0],
        aliceblue: [240, 248, 255, 1],
        antiquewhite: [250, 235, 215, 1],
        aqua: [0, 255, 255, 1],
        aquamarine: [127, 255, 212, 1],
        azure: [240, 255, 255, 1],
        beige: [245, 245, 220, 1],
        bisque: [255, 228, 196, 1],
        black: [0, 0, 0, 1],
        blanchedalmond: [255, 235, 205, 1],
        blue: [0, 0, 255, 1],
        blueviolet: [138, 43, 226, 1],
        brown: [165, 42, 42, 1],
        burlywood: [222, 184, 135, 1],
        cadetblue: [95, 158, 160, 1],
        chartreuse: [127, 255, 0, 1],
        chocolate: [210, 105, 30, 1],
        coral: [255, 127, 80, 1],
        cornflowerblue: [100, 149, 237, 1],
        cornsilk: [255, 248, 220, 1],
        crimson: [220, 20, 60, 1],
        cyan: [0, 255, 255, 1],
        darkblue: [0, 0, 139, 1],
        darkcyan: [0, 139, 139, 1],
        darkgoldenrod: [184, 134, 11, 1],
        darkgray: [169, 169, 169, 1],
        darkgreen: [0, 100, 0, 1],
        darkgrey: [169, 169, 169, 1],
        darkkhaki: [189, 183, 107, 1],
        darkmagenta: [139, 0, 139, 1],
        darkolivegreen: [85, 107, 47, 1],
        darkorange: [255, 140, 0, 1],
        darkorchid: [153, 50, 204, 1],
        darkred: [139, 0, 0, 1],
        darksalmon: [233, 150, 122, 1],
        darkseagreen: [143, 188, 143, 1],
        darkslateblue: [72, 61, 139, 1],
        darkslategray: [47, 79, 79, 1],
        darkslategrey: [47, 79, 79, 1],
        darkturquoise: [0, 206, 209, 1],
        darkviolet: [148, 0, 211, 1],
        deeppink: [255, 20, 147, 1],
        deepskyblue: [0, 191, 255, 1],
        dimgray: [105, 105, 105, 1],
        dimgrey: [105, 105, 105, 1],
        dodgerblue: [30, 144, 255, 1],
        firebrick: [178, 34, 34, 1],
        floralwhite: [255, 250, 240, 1],
        forestgreen: [34, 139, 34, 1],
        fuchsia: [255, 0, 255, 1],
        gainsboro: [220, 220, 220, 1],
        ghostwhite: [248, 248, 255, 1],
        gold: [255, 215, 0, 1],
        goldenrod: [218, 165, 32, 1],
        gray: [128, 128, 128, 1],
        green: [0, 128, 0, 1],
        greenyellow: [173, 255, 47, 1],
        grey: [128, 128, 128, 1],
        honeydew: [240, 255, 240, 1],
        hotpink: [255, 105, 180, 1],
        indianred: [205, 92, 92, 1],
        indigo: [75, 0, 130, 1],
        ivory: [255, 255, 240, 1],
        khaki: [240, 230, 140, 1],
        lavender: [230, 230, 250, 1],
        lavenderblush: [255, 240, 245, 1],
        lawngreen: [124, 252, 0, 1],
        lemonchiffon: [255, 250, 205, 1],
        lightblue: [173, 216, 230, 1],
        lightcoral: [240, 128, 128, 1],
        lightcyan: [224, 255, 255, 1],
        lightgoldenrodyellow: [250, 250, 210, 1],
        lightgray: [211, 211, 211, 1],
        lightgreen: [144, 238, 144, 1],
        lightgrey: [211, 211, 211, 1],
        lightpink: [255, 182, 193, 1],
        lightsalmon: [255, 160, 122, 1],
        lightseagreen: [32, 178, 170, 1],
        lightskyblue: [135, 206, 250, 1],
        lightslategray: [119, 136, 153, 1],
        lightslategrey: [119, 136, 153, 1],
        lightsteelblue: [176, 196, 222, 1],
        lightyellow: [255, 255, 224, 1],
        lime: [0, 255, 0, 1],
        limegreen: [50, 205, 50, 1],
        linen: [250, 240, 230, 1],
        magenta: [255, 0, 255, 1],
        maroon: [128, 0, 0, 1],
        mediumaquamarine: [102, 205, 170, 1],
        mediumblue: [0, 0, 205, 1],
        mediumorchid: [186, 85, 211, 1],
        mediumpurple: [147, 112, 219, 1],
        mediumseagreen: [60, 179, 113, 1],
        mediumslateblue: [123, 104, 238, 1],
        mediumspringgreen: [0, 250, 154, 1],
        mediumturquoise: [72, 209, 204, 1],
        mediumvioletred: [199, 21, 133, 1],
        midnightblue: [25, 25, 112, 1],
        mintcream: [245, 255, 250, 1],
        mistyrose: [255, 228, 225, 1],
        moccasin: [255, 228, 181, 1],
        navajowhite: [255, 222, 173, 1],
        navy: [0, 0, 128, 1],
        oldlace: [253, 245, 230, 1],
        olive: [128, 128, 0, 1],
        olivedrab: [107, 142, 35, 1],
        orange: [255, 165, 0, 1],
        orangered: [255, 69, 0, 1],
        orchid: [218, 112, 214, 1],
        palegoldenrod: [238, 232, 170, 1],
        palegreen: [152, 251, 152, 1],
        paleturquoise: [175, 238, 238, 1],
        palevioletred: [219, 112, 147, 1],
        papayawhip: [255, 239, 213, 1],
        peachpuff: [255, 218, 185, 1],
        peru: [205, 133, 63, 1],
        pink: [255, 192, 203, 1],
        plum: [221, 160, 221, 1],
        powderblue: [176, 224, 230, 1],
        purple: [128, 0, 128, 1],
        red: [255, 0, 0, 1],
        rosybrown: [188, 143, 143, 1],
        royalblue: [65, 105, 225, 1],
        saddlebrown: [139, 69, 19, 1],
        salmon: [250, 128, 114, 1],
        sandybrown: [244, 164, 96, 1],
        seagreen: [46, 139, 87, 1],
        seashell: [255, 245, 238, 1],
        sienna: [160, 82, 45, 1],
        silver: [192, 192, 192, 1],
        skyblue: [135, 206, 235, 1],
        slateblue: [106, 90, 205, 1],
        slategray: [112, 128, 144, 1],
        slategrey: [112, 128, 144, 1],
        snow: [255, 250, 250, 1],
        springgreen: [0, 255, 127, 1],
        steelblue: [70, 130, 180, 1],
        tan: [210, 180, 140, 1],
        teal: [0, 128, 128, 1],
        thistle: [216, 191, 216, 1],
        tomato: [255, 99, 71, 1],
        turquoise: [64, 224, 208, 1],
        violet: [238, 130, 238, 1],
        wheat: [245, 222, 179, 1],
        white: [255, 255, 255, 1],
        whitesmoke: [245, 245, 245, 1],
        yellow: [255, 255, 0, 1],
        yellowgreen: [154, 205, 50, 1]
    };
    var ic = new tc(20);
    var rc = null;
    var ac = Array.prototype.slice;
    var oc = function (t, e, n, i) {
        this._tracks = {};
        this._target = t;
        this._loop = e || false;
        this._getter = n || ke;
        this._setter = i || De;
        this._clipCount = 0;
        this._delay = 0;
        this._doneList = [];
        this._onframeList = [];
        this._clipList = [];
    };
    oc.prototype = {
        when: function (t, e) {
            var n = this._tracks;
            for (var i in e) {
                if (e.hasOwnProperty(i)) {
                    if (!n[i]) {
                        n[i] = [];
                        var r = this._getter(this._target, i);
                        if (null == r) {
                            continue;
                        }
                        if (0 !== t) {
                            n[i].push({
                                time: 0,
                                value: Be(r)
                            });
                        }
                    }
                    n[i].push({
                        time: t,
                        value: e[i]
                    });
                }
            }
            return this;
        },
        during: function (t) {
            this._onframeList.push(t);
            return this;
        },
        pause: function () {
            for (var t = 0; t < this._clipList.length; t++) {
                this._clipList[t].pause();
            }
            this._paused = true;
        },
        resume: function () {
            for (var t = 0; t < this._clipList.length; t++) {
                this._clipList[t].resume();
            }
            this._paused = false;
        },
        isPaused: function () {
            return !!this._paused;
        },
        _doneCallback: function () {
            this._tracks = {};
            this._clipList.length = 0;
            for (t = this._doneList, e = t.length, n = 0, void 0; e > n; n++) {
                var t;
                var e;
                var n;
                t[n].call(this);
            }
        },
        start: function (t, e) {
            var n;
            var that = this;
            var r = 0;
            var a = function () {
                r--;
                r || that._doneCallback();
            };
            for (var o in this._tracks) {
                if (this._tracks.hasOwnProperty(o)) {
                    var s = Fe(this, t, a, this._tracks[o], o, e);
                    if (s) {
                        this._clipList.push(s);
                        r++;
                        if (this.animation) {
                            this.animation.addClip(s);
                        }
                        n = s;
                    }
                }
            }
            if (n) {
                var l = n.onframe;
                n.onframe = function (t, e) {
                    l(t, e);
                    for (var n = 0; n < that._onframeList.length; n++) {
                        that._onframeList[n](t, e);
                    }
                };
            }
            r || this._doneCallback();
            return this;
        },
        stop: function (t) {
            for (e = this._clipList, n = this.animation, i = 0, void 0; i < e.length; i++) {
                var e;
                var n;
                var i;
                var r = e[i];
                if (t) {
                    r.onframe(this._target, 1);
                }
                if (n) {
                    n.removeClip(r);
                }
            }
            e.length = 0;
        },
        delay: function (t) {
            this._delay = t;
            return this;
        },
        done: function (t) {
            if (t) {
                this._doneList.push(t);
            }
            return this;
        },
        getClips: function () {
            return this._clipList;
        }
    };
    var sc = 1;
    if ('undefined' != typeof window) {
        sc = Math.max(window.devicePixelRatio || 1, 1);
    }
    var lc = 0;
    var hc = sc;
    var uc = function () {};
    1 === lc
        ? (uc = function () {
              for (var t in arguments) {
                  throw new Error(arguments[t]);
              }
          })
        : lc > 1 &&
          (uc = function () {
              for (var t in arguments) {
                  console.log(arguments[t]);
              }
          });
    var cc = uc;
    var fc = function () {
        this.animators = [];
    };
    fc.prototype = {
        constructor: fc,
        animate: function (t, e) {
            var n;
            var i = false;
            var that = this;
            var a = this.__zr;
            if (t) {
                var o = t.split('.');
                var s = that;
                i = 'shape' === o[0];
                for (l = 0, u = o.length, void 0; u > l; l++) {
                    var l;
                    var u;
                    if (s) {
                        s = s[o[l]];
                    }
                }
                if (s) {
                    n = s;
                }
            } else {
                n = that;
            }
            if (!n) {
                return void cc('Property "' + t + '" is not existed in element ' + that.id);
            }
            var c = that.animators;
            var f = new oc(n, e);
            f.during(function () {
                that.dirty(i);
            }).done(function () {
                c.splice(h(c, f), 1);
            });
            c.push(f);
            if (a) {
                a.animation.addAnimator(f);
            }
            return f;
        },
        stopAnimation: function (t) {
            for (e = this.animators, n = e.length, i = 0, void 0; n > i; i++) {
                var e;
                var n;
                var i;
                e[i].stop(t);
            }
            e.length = 0;
            return this;
        },
        animateTo: function (t, e, n, i, r, a) {
            function o() {
                l--;
                l || (r && r());
            }
            w(n) ? ((r = i), (i = n), (n = 0)) : x(i) ? ((r = i), (i = 'linear'), (n = 0)) : x(n) ? ((r = n), (n = 0)) : x(e) ? ((r = e), (e = 500)) : e || (e = 500);
            this.stopAnimation();
            this._animateToShallow('', this, t, e, n);
            var s = this.animators.slice();
            var l = s.length;
            l || (r && r());
            for (var h = 0; h < s.length; h++) {
                s[h].done(o).start(i, a);
            }
        },
        _animateToShallow: function (t, e, n, i, r) {
            var a = {};
            var o = 0;
            for (var s in n) {
                if (n.hasOwnProperty(s)) {
                    if (null != e[s]) b(n[s]) && !f(n[s]) ? this._animateToShallow(t ? t + '.' + s : s, e[s], n[s], i, r) : ((a[s] = n[s]), o++);
                    else if (null != n[s]) {
                        if (t) {
                            var l = {};
                            l[t] = {};
                            l[t][s] = n[s];
                            this.attr(l);
                        } else {
                            this.attr(s, n[s]);
                        }
                    }
                }
            }
            if (o > 0) {
                // #ifdef MP-WEIXIN
                this.$scope.animate(t, false);
                // #endif
                // #ifndef MP-WEIXIN
                this.animate(t, false)
                    .when(null == i ? 500 : i, a)
                    .delay(r || 0);
                // #endif
            }
            return this;
        }
    };
    var dc = function (t) {
        Yu.call(this, t);
        Vu.call(this, t);
        fc.call(this, t);
        this.id = t.id || xu();
    };
    dc.prototype = {
        type: 'element',
        name: '',
        __zr: null,
        ignore: false,
        clipPath: null,
        isGroup: false,
        drift: function (t, e) {
            switch (this.draggable) {
                case 'horizontal':
                    e = 0;
                    break;
                case 'vertical':
                    t = 0;
            }
            var n = this.transform;
            n || (n = this.transform = [1, 0, 0, 1, 0, 0]);
            n[4] += t;
            n[5] += e;
            this.decomposeTransform();
            this.dirty(false);
        },
        beforeUpdate: function () {},
        afterUpdate: function () {},
        update: function () {
            this.updateTransform();
        },
        traverse: function () {},
        attrKV: function (t, e) {
            if ('position' === t || 'scale' === t || 'origin' === t) {
                if (e) {
                    var n = this[t];
                    n || (n = this[t] = []);
                    n[0] = e[0];
                    n[1] = e[1];
                }
            } else {
                this[t] = e;
            }
        },
        hide: function () {
            this.ignore = true;
            if (this.__zr) {
                this.__zr.refresh();
            }
        },
        show: function () {
            this.ignore = false;
            if (this.__zr) {
                this.__zr.refresh();
            }
        },
        attr: function (t, e) {
            if ('string' == typeof t) this.attrKV(t, e);
            else if (b(t)) {
                for (var n in t) {
                    if (t.hasOwnProperty(n)) {
                        this.attrKV(n, t[n]);
                    }
                }
            }
            this.dirty(false);
            return this;
        },
        setClipPath: function (t) {
            var e = this.__zr;
            if (e) {
                t.addSelfToZr(e);
            }
            if (this.clipPath && this.clipPath !== t) {
                this.removeClipPath();
            }
            this.clipPath = t;
            t.__zr = e;
            t.__clipTarget = this;
            this.dirty(false);
        },
        removeClipPath: function () {
            var t = this.clipPath;
            if (t) {
                if (t.__zr) {
                    t.removeSelfFromZr(t.__zr);
                }
                t.__zr = null;
                t.__clipTarget = null;
                this.clipPath = null;
                this.dirty(false);
            }
        },
        addSelfToZr: function (t) {
            this.__zr = t;
            var e = this.animators;
            if (e) {
                for (var n = 0; n < e.length; n++) {
                    t.animation.addAnimator(e[n]);
                }
            }
            if (this.clipPath) {
                this.clipPath.addSelfToZr(t);
            }
        },
        removeSelfFromZr: function (t) {
            this.__zr = null;
            var e = this.animators;
            if (e) {
                for (var n = 0; n < e.length; n++) {
                    t.animation.removeAnimator(e[n]);
                }
            }
            if (this.clipPath) {
                this.clipPath.removeSelfFromZr(t);
            }
        }
    };
    c(dc, fc);
    c(dc, Yu);
    c(dc, Vu);
    var pc = K;
    var gc = Math.min;
    var vc = Math.max;
    Ve.prototype = {
        constructor: Ve,
        union: function (t) {
            var e = gc(t.x, this.x);
            var n = gc(t.y, this.y);
            this.width = vc(t.x + t.width, this.x + this.width) - e;
            this.height = vc(t.y + t.height, this.y + this.height) - n;
            this.x = e;
            this.y = n;
        },
        applyTransform: (function () {
            var t = [];
            var e = [];
            var n = [];
            var i = [];
            return function (r) {
                if (r) {
                    t[0] = n[0] = this.x;
                    t[1] = i[1] = this.y;
                    e[0] = i[0] = this.x + this.width;
                    e[1] = n[1] = this.y + this.height;
                    pc(t, t, r);
                    pc(e, e, r);
                    pc(n, n, r);
                    pc(i, i, r);
                    this.x = gc(t[0], e[0], n[0], i[0]);
                    this.y = gc(t[1], e[1], n[1], i[1]);
                    var a = vc(t[0], e[0], n[0], i[0]);
                    var o = vc(t[1], e[1], n[1], i[1]);
                    this.width = a - this.x;
                    this.height = o - this.y;
                }
            };
        })(),
        calculateTransform: function (t) {
            var that = this;
            var n = t.width / that.width;
            var i = t.height / that.height;
            var r = ae();
            he(r, r, [-that.x, -that.y]);
            ce(r, r, [n, i]);
            he(r, r, [t.x, t.y]);
            return r;
        },
        intersect: function (t) {
            if (!t) {
                return false;
            }
            t instanceof Ve || (t = Ve.create(t));
            var that = this;
            var n = that.x;
            var i = that.x + that.width;
            var r = that.y;
            var a = that.y + that.height;
            var o = t.x;
            var s = t.x + t.width;
            var l = t.y;
            var h = t.y + t.height;
            return !(o > i || n > s || l > a || r > h);
        },
        contain: function (t, e) {
            var that = this;
            return t >= that.x && t <= that.x + that.width && e >= that.y && e <= that.y + that.height;
        },
        clone: function () {
            return new Ve(this.x, this.y, this.width, this.height);
        },
        copy: function (t) {
            this.x = t.x;
            this.y = t.y;
            this.width = t.width;
            this.height = t.height;
        },
        plain: function () {
            return {
                x: this.x,
                y: this.y,
                width: this.width,
                height: this.height
            };
        }
    };
    Ve.create = function (t) {
        return new Ve(t.x, t.y, t.width, t.height);
    };
    var mc = function (t) {
        t = t || {};
        dc.call(this, t);
        for (var e in t) {
            if (t.hasOwnProperty(e)) {
                this[e] = t[e];
            }
        }
        this._children = [];
        this.__storage = null;
        this.__dirty = true;
    };
    mc.prototype = {
        constructor: mc,
        isGroup: true,
        type: 'group',
        silent: false,
        children: function () {
            return this._children.slice();
        },
        childAt: function (t) {
            return this._children[t];
        },
        childOfName: function (t) {
            for (e = this._children, n = 0, void 0; n < e.length; n++) {
                var e;
                var n;
                if (e[n].name === t) {
                    return e[n];
                }
            }
        },
        childCount: function () {
            return this._children.length;
        },
        add: function (t) {
            if (t && t !== this && t.parent !== this) {
                this._children.push(t);
                this._doAdd(t);
            }
            return this;
        },
        addBefore: function (t, e) {
            if (t && t !== this && t.parent !== this && e && e.parent === this) {
                var n = this._children;
                var i = n.indexOf(e);
                if (i >= 0) {
                    n.splice(i, 0, t);
                    this._doAdd(t);
                }
            }
            return this;
        },
        _doAdd: function (t) {
            if (t.parent) {
                t.parent.remove(t);
            }
            t.parent = this;
            var e = this.__storage;
            var n = this.__zr;
            if (e && e !== t.__storage) {
                e.addToStorage(t);
                if (t instanceof mc) {
                    t.addChildrenToStorage(e);
                }
            }
            if (n) {
                n.refresh();
            }
        },
        remove: function (t) {
            var e = this.__zr;
            var n = this.__storage;
            var i = this._children;
            var r = h(i, t);
            return 0 > r ? this : (i.splice(r, 1), (t.parent = null), n && (n.delFromStorage(t), t instanceof mc && t.delChildrenFromStorage(n)), e && e.refresh(), this);
        },
        removeAll: function () {
            var t;
            var e;
            var n = this._children;
            var i = this.__storage;
            for (e = 0; e < n.length; e++) {
                t = n[e];
                if (i) {
                    i.delFromStorage(t);
                    if (t instanceof mc) {
                        t.delChildrenFromStorage(i);
                    }
                }
                t.parent = null;
            }
            n.length = 0;
            return this;
        },
        eachChild: function (t, e) {
            for (n = this._children, i = 0, void 0; i < n.length; i++) {
                var n;
                var i;
                var r = n[i];
                t.call(e, r, i);
            }
            return this;
        },
        traverse: function (t, e) {
            for (var n = 0; n < this._children.length; n++) {
                var i = this._children[n];
                t.call(e, i);
                if ('group' === i.type) {
                    i.traverse(t, e);
                }
            }
            return this;
        },
        addChildrenToStorage: function (t) {
            for (var e = 0; e < this._children.length; e++) {
                var n = this._children[e];
                t.addToStorage(n);
                if (n instanceof mc) {
                    n.addChildrenToStorage(t);
                }
            }
        },
        delChildrenFromStorage: function (t) {
            for (var e = 0; e < this._children.length; e++) {
                var n = this._children[e];
                t.delFromStorage(n);
                if (n instanceof mc) {
                    n.delChildrenFromStorage(t);
                }
            }
        },
        dirty: function () {
            this.__dirty = true;
            if (this.__zr) {
                this.__zr.refresh();
            }
            return this;
        },
        getBoundingRect: function (t) {
            for (e = null, n = new Ve(0, 0, 0, 0), i = t || this._children, r = [], a = 0, void 0; a < i.length; a++) {
                var e;
                var n;
                var i;
                var r;
                var a;
                var o = i[a];
                if (!o.ignore && !o.invisible) {
                    var s = o.getBoundingRect();
                    var l = o.getLocalTransform(r);
                    l ? (n.copy(s), n.applyTransform(l), (e = e || n.clone()), e.union(n)) : ((e = e || s.clone()), e.union(s));
                }
            }
            return e || n;
        }
    };
    u(mc, dc);
    var yc = 32;
    var _c = 7;
    var xc = function () {
        this._roots = [];
        this._displayList = [];
        this._displayListLen = 0;
    };
    xc.prototype = {
        constructor: xc,
        traverse: function (t, e) {
            for (var n = 0; n < this._roots.length; n++) {
                this._roots[n].traverse(t, e);
            }
        },
        getDisplayList: function (t, e) {
            e = e || false;
            if (t) {
                this.updateDisplayList(e);
            }
            return this._displayList;
        },
        updateDisplayList: function (t) {
            this._displayListLen = 0;
            for (e = this._roots, n = this._displayList, i = 0, r = e.length, void 0; r > i; i++) {
                var e;
                var n;
                var i;
                var r;
                this._updateAndAddDisplayable(e[i], null, t);
            }
            n.length = this._displayListLen;
            if (bu.canvasSupported) {
                je(n, Ze);
            }
        },
        _updateAndAddDisplayable: function (t, e, n) {
            if (!t.ignore || n) {
                t.beforeUpdate();
                if (t.__dirty) {
                    t.update();
                }
                t.afterUpdate();
                var i = t.clipPath;
                if (i) {
                    e = e ? e.slice() : [];
                    for (r = i, a = t, void 0; r; ) {
                        var r;
                        var a;
                        r.parent = a;
                        r.updateTransform();
                        e.push(r);
                        a = r;
                        r = r.clipPath;
                    }
                }
                if (t.isGroup) {
                    for (o = t._children, s = 0, void 0; s < o.length; s++) {
                        var o;
                        var s;
                        var l = o[s];
                        if (t.__dirty) {
                            l.__dirty = true;
                        }
                        this._updateAndAddDisplayable(l, e, n);
                    }
                    t.__dirty = false;
                } else {
                    t.__clipPaths = e;
                    this._displayList[this._displayListLen++] = t;
                }
            }
        },
        addRoot: function (t) {
            if (t.__storage !== this) {
                if (t instanceof mc) {
                    t.addChildrenToStorage(this);
                }
                this.addToStorage(t);
                this._roots.push(t);
            }
        },
        delRoot: function (t) {
            if (null == t) {
                for (var e = 0; e < this._roots.length; e++) {
                    var n = this._roots[e];
                    if (n instanceof mc) {
                        n.delChildrenFromStorage(this);
                    }
                }
                this._roots = [];
                this._displayList = [];
                return void (this._displayListLen = 0);
            }
            if (t instanceof Array) {
                for (e = 0, i = t.length, void 0; i > e; e++) {
                    var e;
                    var i;
                    this.delRoot(t[e]);
                }
            } else {
                var r = h(this._roots, t);
                if (r >= 0) {
                    this.delFromStorage(t);
                    this._roots.splice(r, 1);
                    if (t instanceof mc) {
                        t.delChildrenFromStorage(this);
                    }
                }
            }
        },
        addToStorage: function (t) {
            if (t) {
                t.__storage = this;
                t.dirty(false);
            }
            return this;
        },
        delFromStorage: function (t) {
            if (t) {
                t.__storage = null;
            }
            return this;
        },
        dispose: function () {
            this._renderList = this._roots = null;
        },
        displayableSortFunc: Ze
    };
    var wc = {
        shadowBlur: 1,
        shadowOffsetX: 1,
        shadowOffsetY: 1,
        textShadowBlur: 1,
        textShadowOffsetX: 1,
        textShadowOffsetY: 1,
        textBoxShadowBlur: 1,
        textBoxShadowOffsetX: 1,
        textBoxShadowOffsetY: 1
    };
    var bc = function (t, e, n) {
        return wc.hasOwnProperty(e) ? (n *= t.dpr) : n;
    };
    var Mc = [
        ['shadowBlur', 0],
        ['shadowOffsetX', 0],
        ['shadowOffsetY', 0],
        ['shadowColor', '#000'],
        ['lineCap', 'butt'],
        ['lineJoin', 'miter'],
        ['miterLimit', 10]
    ];
    var Sc = function (t, e) {
        this.extendFrom(t, false);
        this.host = e;
    };
    Sc.prototype = {
        constructor: Sc,
        host: null,
        fill: '#000',
        stroke: null,
        opacity: 1,
        lineDash: null,
        lineDashOffset: 0,
        shadowBlur: 0,
        shadowOffsetX: 0,
        shadowOffsetY: 0,
        lineWidth: 1,
        strokeNoScale: false,
        text: null,
        font: null,
        textFont: null,
        fontStyle: null,
        fontWeight: null,
        fontSize: null,
        fontFamily: null,
        textTag: null,
        textFill: '#000',
        textStroke: null,
        textWidth: null,
        textHeight: null,
        textStrokeWidth: 0,
        textLineHeight: null,
        textPosition: 'inside',
        textRect: null,
        textOffset: null,
        textAlign: null,
        textVerticalAlign: null,
        textDistance: 5,
        textShadowColor: 'transparent',
        textShadowBlur: 0,
        textShadowOffsetX: 0,
        textShadowOffsetY: 0,
        textBoxShadowColor: 'transparent',
        textBoxShadowBlur: 0,
        textBoxShadowOffsetX: 0,
        textBoxShadowOffsetY: 0,
        transformText: false,
        textRotation: 0,
        textOrigin: null,
        textBackgroundColor: null,
        textBorderColor: null,
        textBorderWidth: 0,
        textBorderRadius: 0,
        textPadding: null,
        rich: null,
        truncate: null,
        blend: null,
        bind: function (t, e, n) {
            for (i = this, r = n && n.style, a = !r, o = 0, void 0; o < Mc.length; o++) {
                var i;
                var r;
                var a;
                var o;
                var s = Mc[o];
                var l = s[0];
                if (a || i[l] !== r[l]) {
                    t[l] = bc(t, l, i[l] || s[1]);
                }
            }
            if (a || i.fill !== r.fill) {
                t.fillStyle = i.fill;
            }
            if (a || i.stroke !== r.stroke) {
                t.strokeStyle = i.stroke;
            }
            if (a || i.opacity !== r.opacity) {
                t.globalAlpha = null == i.opacity ? 1 : i.opacity;
            }
            if (a || i.blend !== r.blend) {
                t.globalCompositeOperation = i.blend || 'source-over';
            }
            if (this.hasStroke()) {
                var h = i.lineWidth;
                t.lineWidth = h / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1);
            }
        },
        hasFill: function () {
            var t = this.fill;
            return null != t && 'none' !== t;
        },
        hasStroke: function () {
            var t = this.stroke;
            return null != t && 'none' !== t && this.lineWidth > 0;
        },
        extendFrom: function (t, e) {
            if (t) {
                for (var n in t) {
                    !t.hasOwnProperty(n) || (e !== true && (e === false ? this.hasOwnProperty(n) : null == t[n])) || (this[n] = t[n]);
                }
            }
        },
        set: function (t, e) {
            'string' == typeof t ? (this[t] = e) : this.extendFrom(t, true);
        },
        clone: function () {
            var t = new this.constructor();
            t.extendFrom(this, true);
            return t;
        },
        getGradient: function (t, e, n) {
            for (i = 'radial' === e.type ? Ke : $e, r = i(t, e, n), a = e.colorStops, o = 0, void 0; o < a.length; o++) {
                var i;
                var r;
                var a;
                var o;
                r.addColorStop(a[o].offset, a[o].color);
            }
            return r;
        }
    };
    for (Cc = Sc.prototype, Tc = 0, void 0; Tc < Mc.length; Tc++) {
        var Cc;
        var Tc;
        var kc = Mc[Tc];
        kc[0] in Cc || (Cc[kc[0]] = kc[1]);
    }
    Sc.getGradient = Cc.getGradient;
    var Dc = function (t, e) {
        this.image = t;
        this.repeat = e;
        this.type = 'pattern';
    };
    Dc.prototype.getCanvasPattern = function (t) {
        return t.createPattern(this.image, this.repeat || 'repeat');
    };
    var Ic = function (t, e, n) {
        var i;
        n = n || hc;
        'string' == typeof t ? (i = Je(t, e, n)) : b(t) && ((i = t), (t = i.id));
        this.id = t;
        this.dom = i;
        var r = i.style;
        if (r) {
            i.onselectstart = Qe;
            r['-webkit-user-select'] = 'none';
            r['user-select'] = 'none';
            r['-webkit-touch-callout'] = 'none';
            r['-webkit-tap-highlight-color'] = 'rgba(0,0,0,0)';
            r.padding = 0;
            r.margin = 0;
            r['border-width'] = 0;
        }
        this.domBack = null;
        this.ctxBack = null;
        this.painter = e;
        this.config = null;
        this.clearColor = 0;
        this.motionBlur = false;
        this.lastFrameAlpha = 0.7;
        this.dpr = n;
    };
    Ic.prototype = {
        constructor: Ic,
        __dirty: true,
        __used: false,
        __drawIndex: 0,
        __startIndex: 0,
        __endIndex: 0,
        incremental: false,
        getElementCount: function () {
            return this.__endIndex - this.__startIndex;
        },
        initContext: function () {
            this.ctx = this.dom.getContext('2d');
            this.ctx.dpr = this.dpr;
        },
        createBackBuffer: function () {
            var t = this.dpr;
            this.domBack = Je('back-' + this.id, this.painter, t);
            this.ctxBack = this.domBack.getContext('2d');
            if (1 != t) {
                this.ctxBack.scale(t, t);
            }
        },
        resize: function (t, e) {
            var n = this.dpr;
            var i = this.dom;
            var r = i.style;
            var a = this.domBack;
            if (r) {
                r.width = t + 'px';
                r.height = e + 'px';
            }
            i.width = t * n;
            i.height = e * n;
            if (a) {
                a.width = t * n;
                a.height = e * n;
                if (1 != n) {
                    this.ctxBack.scale(n, n);
                }
            }
        },
        clear: function (t, e) {
            var n = this.dom;
            var i = this.ctx;
            var r = n.width;
            var a = n.height;
            var e = e || this.clearColor;
            var o = this.motionBlur && !t;
            var s = this.lastFrameAlpha;
            var l = this.dpr;
            if (o) {
                this.domBack || this.createBackBuffer();
                this.ctxBack.globalCompositeOperation = 'copy';
                this.ctxBack.drawImage(n, 0, 0, r / l, a / l);
            }
            i.clearRect(0, 0, r, a);
            if (e && 'transparent' !== e) {
                var h;
                e.colorStops
                    ? ((h =
                          e.__canvasGradient ||
                          Sc.getGradient(i, e, {
                              x: 0,
                              y: 0,
                              width: r,
                              height: a
                          })),
                      (e.__canvasGradient = h))
                    : e.image && (h = Dc.prototype.getCanvasPattern.call(e, i));
                i.save();
                i.fillStyle = h || e;
                i.fillRect(0, 0, r, a);
                i.restore();
            }
            if (o) {
                var u = this.domBack;
                i.save();
                i.globalAlpha = s;
                i.drawImage(u, 0, 0, r, a);
                i.restore();
            }
        }
    };
    var Ac =
        ('undefined' != typeof window &&
            ((window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) ||
                (window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window)) ||
                window.mozRequestAnimationFrame ||
                window.webkitRequestAnimationFrame)) ||
        function (t) {
            setTimeout(t, 16);
        };
    var Lc = new tc(50);
    var Pc = {};
    var Oc = 0;
    var Ec = 5000;
    var Rc = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
    var Bc = '12px sans-serif';
    var zc = {};
    zc.measureText = function (t, e) {
        var n = l();
        n.font = e || Bc;
        return n.measureText(t);
    };
    var Nc = {
        left: 1,
        right: 1,
        center: 1
    };
    var Fc = {
        top: 1,
        bottom: 1,
        middle: 1
    };
    var Vc = new Ve();
    var Wc = function () {};
    Wc.prototype = {
        constructor: Wc,
        drawRectText: function (t, e) {
            var n = this.style;
            e = n.textRect || e;
            if (this.__dirty) {
                Mn(n, true);
            }
            var i = n.text;
            if (null != i) {
                i += '';
            }
            if (Vn(i, n)) {
                t.save();
                var r = this.transform;
                n.transformText ? this.setTransform(t) : r && (Vc.copy(e), Vc.applyTransform(r), (e = Vc));
                Cn(this, t, i, n, e);
                t.restore();
            }
        }
    };
    // #ifdef MP-WEIXIN
    this.$scope.animate('style', t);
    // #endif
    // #ifndef MP-WEIXIN
    Wn.prototype = {
        constructor: Wn,
        type: 'displayable',
        __dirty: true,
        invisible: false,
        z: 0,
        z2: 0,
        zlevel: 0,
        draggable: false,
        dragging: false,
        silent: false,
        culling: false,
        cursor: 'pointer',
        rectHover: false,
        progressive: false,
        incremental: false,
        inplace: false,
        beforeBrush: function () {},
        afterBrush: function () {},
        brush: function () {},
        getBoundingRect: function () {},
        contain: function (t, e) {
            return this.rectContain(t, e);
        },
        traverse: function (t, e) {
            t.call(e, this);
        },
        rectContain: function (t, e) {
            var n = this.transformCoordToLocal(t, e);
            var i = this.getBoundingRect();
            return i.contain(n[0], n[1]);
        },
        dirty: function () {
            this.__dirty = true;
            this._rect = null;
            if (this.__zr) {
                this.__zr.refresh();
            }
        },
        animateStyle: function (t) {
            return this.animate('style', t);
        },
        attrKV: function (t, e) {
            'style' !== t ? dc.prototype.attrKV.call(this, t, e) : this.style.set(e);
        },
        setStyle: function (t, e) {
            this.style.set(t, e);
            this.dirty(false);
            return this;
        },
        useStyle: function (t) {
            this.style = new Sc(t, this);
            this.dirty(false);
            return this;
        }
    };
    // #endif
    u(Wn, dc);
    c(Wn, Wc);
    Hn.prototype = {
        constructor: Hn,
        type: 'image',
        brush: function (t, e) {
            var n = this.style;
            var i = n.image;
            n.bind(t, this, e);
            var r = (this._image = en(i, this._image, this, this.onload));
            if (r && rn(r)) {
                var a = n.x || 0;
                var o = n.y || 0;
                var s = n.width;
                var l = n.height;
                var h = r.width / r.height;
                null == s && null != l ? (s = l * h) : null == l && null != s ? (l = s / h) : null == s && null == l && ((s = r.width), (l = r.height));
                this.setTransform(t);
                if (n.sWidth && n.sHeight) {
                    var u = n.sx || 0;
                    var c = n.sy || 0;
                    t.drawImage(r, u, c, n.sWidth, n.sHeight, a, o, s, l);
                } else if (n.sx && n.sy) {
                    var u = n.sx;
                    var c = n.sy;
                    var f = s - u;
                    var d = l - c;
                    t.drawImage(r, u, c, f, d, a, o, s, l);
                } else {
                    t.drawImage(r, a, o, s, l);
                }
                if (null != n.text) {
                    this.restoreTransform(t);
                    this.drawRectText(t, this.getBoundingRect());
                }
            }
        },
        getBoundingRect: function () {
            var t = this.style;
            this._rect || (this._rect = new Ve(t.x || 0, t.y || 0, t.width || 0, t.height || 0));
            return this._rect;
        }
    };
    u(Hn, Wn);
    var Hc = 100000;
    var Gc = 314159;
    var qc = 0.01;
    var Xc = 0.001;
    var Uc = new Ve(0, 0, 0, 0);
    var Yc = new Ve(0, 0, 0, 0);
    var jc = function (t, e, n) {
        this.type = 'canvas';
        var i = !t.nodeName || 'CANVAS' === t.nodeName.toUpperCase();
        this._opts = n = o({}, n || {});
        this.dpr = n.devicePixelRatio || hc;
        this._singleCanvas = i;
        this.root = t;
        var r = t.style;
        if (r) {
            r['-webkit-tap-highlight-color'] = 'transparent';
            r['-webkit-user-select'] = r['user-select'] = r['-webkit-touch-callout'] = 'none';
            t.innerHTML = '';
        }
        this.storage = e;
        var a = (this._zlevelList = []);
        var s = (this._layers = {});
        this._layerConfig = {};
        this._needsManuallyCompositing = false;
        if (i) {
            var l = t.width;
            var h = t.height;
            if (null != n.width) {
                l = n.width;
            }
            if (null != n.height) {
                h = n.height;
            }
            this.dpr = n.devicePixelRatio || 1;
            t.width = l * this.dpr;
            t.height = h * this.dpr;
            this._width = l;
            this._height = h;
            var u = new Ic(t, this, this.dpr);
            u.__builtin__ = true;
            u.initContext();
            s[Gc] = u;
            u.zlevel = Gc;
            a.push(Gc);
            this._domRoot = t;
        } else {
            this._width = this._getSize(0);
            this._height = this._getSize(1);
            var c = (this._domRoot = jn(this._width, this._height));
            t.appendChild(c);
        }
        this._hoverlayer = null;
        this._hoverElements = [];
    };
    jc.prototype = {
        constructor: jc,
        getType: function () {
            return 'canvas';
        },
        isSingleCanvas: function () {
            return this._singleCanvas;
        },
        getViewportRoot: function () {
            return this._domRoot;
        },
        getViewportRootOffset: function () {
            var t = this.getViewportRoot();
            return t
                ? {
                      offsetLeft: t.offsetLeft || 0,
                      offsetTop: t.offsetTop || 0
                  }
                : void 0;
        },
        refresh: function (t) {
            var e = this.storage.getDisplayList(true);
            var n = this._zlevelList;
            this._redrawId = Math.random();
            this._paintList(e, t, this._redrawId);
            for (var i = 0; i < n.length; i++) {
                var r = n[i];
                var a = this._layers[r];
                if (!a.__builtin__ && a.refresh) {
                    var o = 0 === i ? this._backgroundColor : null;
                    a.refresh(o);
                }
            }
            this.refreshHover();
            return this;
        },
        addHover: function (t, e) {
            if (!t.__hoverMir) {
                var n = new t.constructor({
                    style: t.style,
                    shape: t.shape
                });
                n.__from = t;
                t.__hoverMir = n;
                n.setStyle(e);
                this._hoverElements.push(n);
            }
        },
        removeHover: function (t) {
            var e = t.__hoverMir;
            var n = this._hoverElements;
            var i = h(n, e);
            if (i >= 0) {
                n.splice(i, 1);
            }
            t.__hoverMir = null;
        },
        clearHover: function () {
            for (t = this._hoverElements, e = 0, void 0; e < t.length; e++) {
                var t;
                var e;
                var n = t[e].__from;
                if (n) {
                    n.__hoverMir = null;
                }
            }
            t.length = 0;
        },
        refreshHover: function () {
            var t = this._hoverElements;
            var e = t.length;
            var n = this._hoverlayer;
            if (n) {
                n.clear();
            }
            if (e) {
                je(t, this.storage.displayableSortFunc);
                n || (n = this._hoverlayer = this.getLayer(Hc));
                var i = {};
                n.ctx.save();
                for (var r = 0; e > r; ) {
                    var a = t[r];
                    var o = a.__from;
                    o && o.__zr
                        ? (r++, o.invisible || ((a.transform = o.transform), (a.invTransform = o.invTransform), (a.__clipPaths = o.__clipPaths), this._doPaintEl(a, n, true, i)))
                        : (t.splice(r, 1), (o.__hoverMir = null), e--);
                }
                n.ctx.restore();
            }
        },
        getHoverLayer: function () {
            return this.getLayer(Hc);
        },
        _paintList: function (t, e, n) {
            if (this._redrawId === n) {
                e = e || false;
                this._updateLayerStatus(t);
                var i = this._doPaintList(t, e);
                if (this._needsManuallyCompositing) {
                    this._compositeManually();
                }
                if (!i) {
                    var that = this;
                    Ac(function () {
                        that._paintList(t, e, n);
                    });
                }
            }
        },
        _compositeManually: function () {
            var t = this.getLayer(Gc).ctx;
            var e = this._domRoot.width;
            var n = this._domRoot.height;
            t.clearRect(0, 0, e, n);
            this.eachBuiltinLayer(function (i) {
                if (i.virtual) {
                    t.drawImage(i.dom, 0, 0, e, n);
                }
            });
        },
        _doPaintList: function (t, e) {
            for (n = [], i = 0, void 0; i < this._zlevelList.length; i++) {
                var n;
                var i;
                var r = this._zlevelList[i];
                var a = this._layers[r];
                if (a.__builtin__ && a !== this._hoverlayer && (a.__dirty || e)) {
                    n.push(a);
                }
            }
            for (o = true, s = 0, void 0; s < n.length; s++) {
                var o;
                var s;
                var a = n[s];
                var l = a.ctx;
                var h = {};
                l.save();
                var u = e ? a.__startIndex : a.__drawIndex;
                var c = !e && a.incremental && Date.now;
                var f = c && Date.now();
                var p = a.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
                if (a.__startIndex === a.__endIndex) a.clear(false, p);
                else if (u === a.__startIndex) {
                    var g = t[u];
                    (g.incremental && g.notClear && !e) || a.clear(false, p);
                }
                if (-1 === u) {
                    console.error('For some unknown reason. drawIndex is -1');
                    u = a.__startIndex;
                }
                for (var v = u; v < a.__endIndex; v++) {
                    var m = t[v];
                    this._doPaintEl(m, a, e, h);
                    m.__dirty = false;
                    if (c) {
                        var y = Date.now() - f;
                        if (y > 15) {
                            break;
                        }
                    }
                }
                a.__drawIndex = v;
                if (a.__drawIndex < a.__endIndex) {
                    o = false;
                }
                if (h.prevElClipPaths) {
                    l.restore();
                }
                l.restore();
            }
            if (bu.wxa) {
                d(this._layers, function (t) {
                    if (t && t.ctx && t.ctx.draw) {
                        t.ctx.draw();
                    }
                });
            }
            return o;
        },
        _doPaintEl: function (t, e, n, i) {
            var r = e.ctx;
            var a = t.transform;
            if (!((!e.__dirty && !n) || t.invisible || 0 === t.style.opacity || (a && !a[0] && !a[3]) || (t.culling && Xn(t, this._width, this._height)))) {
                var o = t.__clipPaths;
                if (!i.prevElClipPaths || Un(o, i.prevElClipPaths)) {
                    if (i.prevElClipPaths) {
                        e.ctx.restore(), (i.prevElClipPaths = null), (i.prevEl = null);
                    }
                    if (o) {
                        r.save(), Yn(o, r), (i.prevElClipPaths = o);
                    }
                }
                if (t.beforeBrush) {
                    t.beforeBrush(r);
                }
                t.brush(r, i.prevEl || null);
                i.prevEl = t;
                if (t.afterBrush) {
                    t.afterBrush(r);
                }
            }
        },
        getLayer: function (t, e) {
            if (this._singleCanvas && !this._needsManuallyCompositing) {
                t = Gc;
            }
            var n = this._layers[t];
            n ||
                ((n = new Ic('zr_' + t, this, this.dpr)),
                (n.zlevel = t),
                (n.__builtin__ = true),
                this._layerConfig[t] && r(n, this._layerConfig[t], true),
                e && (n.virtual = e),
                this.insertLayer(t, n),
                n.initContext());
            return n;
        },
        insertLayer: function (t, e) {
            var n = this._layers;
            var i = this._zlevelList;
            var r = i.length;
            var a = null;
            var o = -1;
            var s = this._domRoot;
            if (n[t]) {
                return void cc('ZLevel ' + t + ' has been used already');
            }
            if (!qn(e)) {
                return void cc('Layer of zlevel ' + t + ' is not valid');
            }
            if (r > 0 && t > i[0]) {
                for (o = 0; r - 1 > o && !(i[o] < t && i[o + 1] > t); o++) {}
                a = n[i[o]];
            }
            i.splice(o + 1, 0, t);
            n[t] = e;
            if (!e.virtual) {
                if (a) {
                    var l = a.dom;
                    l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom);
                } else {
                    s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom);
                }
            }
        },
        eachLayer: function (t, e) {
            var n;
            var i;
            var r = this._zlevelList;
            for (i = 0; i < r.length; i++) {
                n = r[i];
                t.call(e, this._layers[n], n);
            }
        },
        eachBuiltinLayer: function (t, e) {
            var n;
            var i;
            var r;
            var a = this._zlevelList;
            for (r = 0; r < a.length; r++) {
                i = a[r];
                n = this._layers[i];
                if (n.__builtin__) {
                    t.call(e, n, i);
                }
            }
        },
        eachOtherLayer: function (t, e) {
            var n;
            var i;
            var r;
            var a = this._zlevelList;
            for (r = 0; r < a.length; r++) {
                i = a[r];
                n = this._layers[i];
                n.__builtin__ || t.call(e, n, i);
            }
        },
        getLayers: function () {
            return this._layers;
        },
        _updateLayerStatus: function (t) {
            function e(t) {
                if (r) {
                    if (r.__endIndex !== t) {
                        r.__dirty = true;
                    }
                    r.__endIndex = t;
                }
            }
            this.eachBuiltinLayer(function (t) {
                t.__dirty = t.__used = false;
            });
            if (this._singleCanvas) {
                for (var n = 1; n < t.length; n++) {
                    var i = t[n];
                    if (i.zlevel !== t[n - 1].zlevel || i.incremental) {
                        this._needsManuallyCompositing = true;
                        break;
                    }
                }
            }
            for (r = null, a = 0, n = 0, void 0; n < t.length; n++) {
                var r;
                var a;
                var n;
                var o;
                var i = t[n];
                var s = i.zlevel;
                i.incremental
                    ? ((o = this.getLayer(s + Xc, this._needsManuallyCompositing)), (o.incremental = true), (a = 1))
                    : (o = this.getLayer(s + (a > 0 ? qc : 0), this._needsManuallyCompositing));
                o.__builtin__ || cc('ZLevel ' + s + ' has been used by unkown layer ' + o.id);
                if (o !== r) {
                    o.__used = true;
                    if (o.__startIndex !== n) {
                        o.__dirty = true;
                    }
                    o.__startIndex = n;
                    o.__drawIndex = o.incremental ? -1 : n;
                    e(n);
                    r = o;
                }
                if (i.__dirty) {
                    o.__dirty = true;
                    if (o.incremental && o.__drawIndex < 0) {
                        o.__drawIndex = n;
                    }
                }
            }
            e(n);
            this.eachBuiltinLayer(function (t) {
                if (!t.__used && t.getElementCount() > 0) {
                    t.__dirty = true;
                    t.__startIndex = t.__endIndex = t.__drawIndex = 0;
                }
                if (t.__dirty && t.__drawIndex < 0) {
                    t.__drawIndex = t.__startIndex;
                }
            });
        },
        clear: function () {
            this.eachBuiltinLayer(this._clearLayer);
            return this;
        },
        _clearLayer: function (t) {
            t.clear();
        },
        setBackgroundColor: function (t) {
            this._backgroundColor = t;
        },
        configLayer: function (t, e) {
            if (e) {
                var n = this._layerConfig;
                n[t] ? r(n[t], e, true) : (n[t] = e);
                for (var i = 0; i < this._zlevelList.length; i++) {
                    var a = this._zlevelList[i];
                    if (a === t || a === t + qc) {
                        var o = this._layers[a];
                        r(o, n[t], true);
                    }
                }
            }
        },
        delLayer: function (t) {
            var e = this._layers;
            var n = this._zlevelList;
            var i = e[t];
            if (i) {
                i.dom.parentNode.removeChild(i.dom);
                delete e[t];
                n.splice(h(n, t), 1);
            }
        },
        resize: function (t, e) {
            if (this._domRoot.style) {
                var n = this._domRoot;
                n.style.display = 'none';
                var i = this._opts;
                if (null != t) {
                    i.width = t;
                }
                if (null != e) {
                    i.height = e;
                }
                t = this._getSize(0);
                e = this._getSize(1);
                n.style.display = '';
                if (this._width != t || e != this._height) {
                    n.style.width = t + 'px';
                    n.style.height = e + 'px';
                    for (var r in this._layers) {
                        if (this._layers.hasOwnProperty(r)) {
                            this._layers[r].resize(t, e);
                        }
                    }
                    d(this._progressiveLayers, function (n) {
                        n.resize(t, e);
                    });
                    this.refresh(true);
                }
                this._width = t;
                this._height = e;
            } else {
                if (null == t || null == e) {
                    return;
                }
                this._width = t;
                this._height = e;
                this.getLayer(Gc).resize(t, e);
            }
            return this;
        },
        clearLayer: function (t) {
            var e = this._layers[t];
            if (e) {
                e.clear();
            }
        },
        dispose: function () {
            this.root.innerHTML = '';
            this.root = this.storage = this._domRoot = this._layers = null;
        },
        getRenderedCanvas: function (t) {
            t = t || {};
            if (this._singleCanvas && !this._compositeManually) {
                return this._layers[Gc].dom;
            }
            var e = new Ic('image', this, t.pixelRatio || this.dpr);
            e.initContext();
            e.clear(false, t.backgroundColor || this._backgroundColor);
            if (t.pixelRatio <= this.dpr) {
                this.refresh();
                var n = e.dom.width;
                var i = e.dom.height;
                var r = e.ctx;
                this.eachLayer(function (t) {
                    t.__builtin__ ? r.drawImage(t.dom, 0, 0, n, i) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore());
                });
            } else {
                for (a = {}, o = this.storage.getDisplayList(true), s = 0, void 0; s < o.length; s++) {
                    var a;
                    var o;
                    var s;
                    var l = o[s];
                    this._doPaintEl(l, e, true, a);
                }
            }
            return e.dom;
        },
        getWidth: function () {
            return this._width;
        },
        getHeight: function () {
            return this._height;
        },
        _getSize: function (t) {
            var e = this._opts;
            var n = ['width', 'height'][t];
            var i = ['clientWidth', 'clientHeight'][t];
            var r = ['paddingLeft', 'paddingTop'][t];
            var a = ['paddingRight', 'paddingBottom'][t];
            if (null != e[n] && 'auto' !== e[n]) {
                return parseFloat(e[n]);
            }
            var o = this.root;
            var s = document.defaultView.getComputedStyle(o);
            return ((o[i] || Gn(s[n]) || Gn(o.style[n])) - (Gn(s[r]) || 0) - (Gn(s[a]) || 0)) | 0;
        },
        pathToImage: function (t, e) {
            e = e || this.dpr;
            var n = document.createElement('canvas');
            var i = n.getContext('2d');
            var r = t.getBoundingRect();
            var a = t.style;
            var o = a.shadowBlur * e;
            var s = a.shadowOffsetX * e;
            var l = a.shadowOffsetY * e;
            var h = a.hasStroke() ? a.lineWidth : 0;
            var u = Math.max(h / 2, -s + o);
            var c = Math.max(h / 2, s + o);
            var f = Math.max(h / 2, -l + o);
            var d = Math.max(h / 2, l + o);
            var p = r.width + u + c;
            var g = r.height + f + d;
            n.width = p * e;
            n.height = g * e;
            i.scale(e, e);
            i.clearRect(0, 0, p, g);
            i.dpr = e;
            var v = {
                position: t.position,
                rotation: t.rotation,
                scale: t.scale
            };
            t.position = [u - r.x, f - r.y];
            t.rotation = 0;
            t.scale = [1, 1];
            t.updateTransform();
            if (t) {
                t.brush(i);
            }
            var m = Hn;
            var y = new m({
                style: {
                    x: 0,
                    y: 0,
                    image: n
                }
            });
            if (null != v.position) {
                y.position = t.position = v.position;
            }
            if (null != v.rotation) {
                y.rotation = t.rotation = v.rotation;
            }
            if (null != v.scale) {
                y.scale = t.scale = v.scale;
            }
            return y;
        }
    };
    var Zc = 'undefined' != typeof window && !!window.addEventListener;
    var $c = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
    var Kc = function (t) {
        t = t || {};
        this.stage = t.stage || {};
        this.onframe = t.onframe || function () {};
        this._clips = [];
        this._running = false;
        this._time;
        this._pausedTime;
        this._pauseStart;
        this._paused = false;
        Vu.call(this);
    };
    Kc.prototype = {
        constructor: Kc,
        addClip: function (t) {
            this._clips.push(t);
        },
        addAnimator: function (t) {
            t.animation = this;
            for (e = t.getClips(), n = 0, void 0; n < e.length; n++) {
                var e;
                var n;
                this.addClip(e[n]);
            }
        },
        removeClip: function (t) {
            var e = h(this._clips, t);
            if (e >= 0) {
                this._clips.splice(e, 1);
            }
        },
        removeAnimator: function (t) {
            for (e = t.getClips(), n = 0, void 0; n < e.length; n++) {
                var e;
                var n;
                this.removeClip(e[n]);
            }
            t.animation = null;
        },
        _update: function () {
            for (t = new Date().getTime() - this._pausedTime, e = t - this._time, n = this._clips, i = n.length, r = [], a = [], o = 0, void 0; i > o; o++) {
                var t;
                var e;
                var n;
                var i;
                var r;
                var a;
                var o;
                var s = n[o];
                var l = s.step(t, e);
                if (l) {
                    r.push(l);
                    a.push(s);
                }
            }
            for (var o = 0; i > o; ) {
                n[o]._needsRemove ? ((n[o] = n[i - 1]), n.pop(), i--) : o++;
            }
            i = r.length;
            for (var o = 0; i > o; o++) {
                a[o].fire(r[o]);
            }
            this._time = t;
            this.onframe(e);
            this.trigger('frame', e);
            if (this.stage.update) {
                this.stage.update();
            }
        },
        _startLoop: function () {
            function t() {
                if (that._running) {
                    Ac(t);
                    if (!that._paused) {
                        that._update();
                    }
                }
            }
            var that = this;
            this._running = true;
            Ac(t);
        },
        start: function () {
            this._time = new Date().getTime();
            this._pausedTime = 0;
            this._startLoop();
        },
        stop: function () {
            this._running = false;
        },
        pause: function () {
            this._paused || ((this._pauseStart = new Date().getTime()), (this._paused = true));
        },
        resume: function () {
            if (this._paused) {
                this._pausedTime += new Date().getTime() - this._pauseStart;
                this._paused = false;
            }
        },
        clear: function () {
            this._clips = [];
        },
        isFinished: function () {
            return !this._clips.length;
        },
        animate: function (t, e) {
            e = e || {};
            var n = new oc(t, e.loop, e.getter, e.setter);
            this.addAnimator(n);
            return n;
        }
    };
    c(Kc, Vu);
    var Qc = function () {
        this._track = [];
    };
    Qc.prototype = {
        constructor: Qc,
        recognize: function (t, e, n) {
            this._doTrack(t, e, n);
            return this._recognize(t);
        },
        clear: function () {
            this._track.length = 0;
            return this;
        },
        _doTrack: function (t, e, n) {
            var i = t.touches;
            if (i) {
                for (
                    r = {
                        points: [],
                        touches: [],
                        target: e,
                        event: t
                    },
                        a = 0,
                        o = i.length,
                        void 0;
                    o > a;
                    a++
                ) {
                    var r;
                    var a;
                    var o;
                    var s = i[a];
                    var l = $n(n, s, {});
                    r.points.push([l.zrX, l.zrY]);
                    r.touches.push(s);
                }
                this._track.push(r);
            }
        },
        _recognize: function (t) {
            for (var e in Jc) {
                if (Jc.hasOwnProperty(e)) {
                    var n = Jc[e](this._track, t);
                    if (n) {
                        return n;
                    }
                }
            }
        }
    };
    var Jc = {
        pinch: function (t, e) {
            var n = t.length;
            if (n) {
                var i = (t[n - 1] || {}).points;
                var r = (t[n - 2] || {}).points || i;
                if (r && r.length > 1 && i && i.length > 1) {
                    var a = ei(i) / ei(r);
                    if (!isFinite(a)) {
                        a = 1;
                    }
                    e.pinchScale = a;
                    var o = ni(i);
                    e.pinchX = o[0];
                    e.pinchY = o[1];
                    return {
                        type: 'pinch',
                        target: t[0].target,
                        event: e
                    };
                }
            }
        }
    };
    var tf = 300;
    var ef = ['click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu'];
    var nf = ['touchstart', 'touchend', 'touchmove'];
    var rf = {
        pointerdown: 1,
        pointerup: 1,
        pointermove: 1,
        pointerout: 1
    };
    var af = p(ef, function (t) {
        var e = t.replace('mouse', 'pointer');
        return rf[e] ? e : t;
    });
    var of = {
        mousemove: function (t) {
            t = Qn(this.dom, t);
            this.trigger('mousemove', t);
        },
        mouseout: function (t) {
            t = Qn(this.dom, t);
            var e = t.toElement || t.relatedTarget;
            if (e != this.dom) {
                for (; e && 9 != e.nodeType; ) {
                    if (e === this.dom) {
                        return;
                    }
                    e = e.parentNode;
                }
            }
            this.trigger('mouseout', t);
        },
        touchstart: function (t) {
            t = Qn(this.dom, t);
            t.zrByTouch = true;
            this._lastTouchMoment = new Date();
            ri(this, t, 'start');
            of.mousemove.call(this, t);
            of.mousedown.call(this, t);
            ai(this);
        },
        touchmove: function (t) {
            t = Qn(this.dom, t);
            t.zrByTouch = true;
            ri(this, t, 'change');
            of.mousemove.call(this, t);
            ai(this);
        },
        touchend: function (t) {
            t = Qn(this.dom, t);
            t.zrByTouch = true;
            ri(this, t, 'end');
            of.mouseup.call(this, t);
            if (+new Date() - this._lastTouchMoment < tf) {
                of.click.call(this, t);
            }
            ai(this);
        },
        pointerdown: function (t) {
            of.mousedown.call(this, t);
        },
        pointermove: function (t) {
            oi(t) || of.mousemove.call(this, t);
        },
        pointerup: function (t) {
            of.mouseup.call(this, t);
        },
        pointerout: function (t) {
            oi(t) || of.mouseout.call(this, t);
        }
    };
    d(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (t) {
        of[t] = function (e) {
            e = Qn(this.dom, e);
            this.trigger(t, e);
        };
    });
    var sf = li.prototype;
    sf.dispose = function () {
        for (t = ef.concat(nf), e = 0, void 0; e < t.length; e++) {
            var t;
            var e;
            var n = t[e];
            ti(this.dom, ii(n), this._handlers[n]);
        }
    };
    sf.setCursor = function (t) {
        if (this.dom.style) {
            this.dom.style.cursor = t || 'default';
        }
    };
    c(li, Vu);
    var lf = !bu.canvasSupported;
    var hf = {
        canvas: jc
    };
    var uf = function (t, e, n) {
        n = n || {};
        this.dom = e;
        this.id = t;
        var that = this;
        var r = new xc();
        var a = n.renderer;
        if (lf) {
            if (!hf.vml) {
                throw new Error("You need to require 'zrender/vml/vml' to support IE8");
            }
            a = 'vml';
        } else {
            (a && hf[a]) || (a = 'canvas');
        }
        var o = new hf[a](e, r, n, t);
        this.storage = r;
        this.painter = o;
        var s = bu.node || bu.worker ? null : new li(o.getViewportRoot());
        this.handler = new Gu(r, o, s, o.root);
        this.animation = new Kc({
            stage: {
                update: m(this.flush, this)
            }
        });
        this.animation.start();
        this._needsRefresh;
        var l = r.delFromStorage;
        var h = r.addToStorage;
        r.delFromStorage = function (t) {
            l.call(r, t);
            if (t) {
                t.removeSelfFromZr(that);
            }
        };
        r.addToStorage = function (t) {
            h.call(r, t);
            t.addSelfToZr(that);
        };
    };
    uf.prototype = {
        constructor: uf,
        getId: function () {
            return this.id;
        },
        add: function (t) {
            this.storage.addRoot(t);
            this._needsRefresh = true;
        },
        remove: function (t) {
            this.storage.delRoot(t);
            this._needsRefresh = true;
        },
        configLayer: function (t, e) {
            if (this.painter.configLayer) {
                this.painter.configLayer(t, e);
            }
            this._needsRefresh = true;
        },
        setBackgroundColor: function (t) {
            if (this.painter.setBackgroundColor) {
                this.painter.setBackgroundColor(t);
            }
            this._needsRefresh = true;
        },
        refreshImmediately: function () {
            this._needsRefresh = false;
            this.painter.refresh();
            this._needsRefresh = false;
        },
        refresh: function () {
            this._needsRefresh = true;
        },
        flush: function () {
            var t;
            if (this._needsRefresh) {
                t = true;
                this.refreshImmediately();
            }
            if (this._needsRefreshHover) {
                t = true;
                this.refreshHoverImmediately();
            }
            if (t) {
                this.trigger('rendered');
            }
        },
        addHover: function (t, e) {
            if (this.painter.addHover) {
                this.painter.addHover(t, e);
                this.refreshHover();
            }
        },
        removeHover: function (t) {
            if (this.painter.removeHover) {
                this.painter.removeHover(t);
                this.refreshHover();
            }
        },
        clearHover: function () {
            if (this.painter.clearHover) {
                this.painter.clearHover();
                this.refreshHover();
            }
        },
        refreshHover: function () {
            this._needsRefreshHover = true;
        },
        refreshHoverImmediately: function () {
            this._needsRefreshHover = false;
            if (this.painter.refreshHover) {
                this.painter.refreshHover();
            }
        },
        resize: function (t) {
            t = t || {};
            this.painter.resize(t.width, t.height);
            this.handler.resize();
        },
        clearAnimation: function () {
            this.animation.clear();
        },
        getWidth: function () {
            return this.painter.getWidth();
        },
        getHeight: function () {
            return this.painter.getHeight();
        },
        pathToImage: function (t, e) {
            return this.painter.pathToImage(t, e);
        },
        setCursorStyle: function (t) {
            this.handler.setCursorStyle(t);
        },
        findHover: function (t, e) {
            return this.handler.findHover(t, e);
        },
        on: function (t, e, n) {
            this.handler.on(t, e, n);
        },
        off: function (t, e) {
            this.handler.off(t, e);
        },
        trigger: function (t, e) {
            this.handler.trigger(t, e);
        },
        clear: function () {
            this.storage.delRoot();
            this.painter.clear();
        },
        dispose: function () {
            this.animation.stop();
            this.clear();
            this.storage.dispose();
            this.painter.dispose();
            this.handler.dispose();
            this.animation = this.storage = this.painter = this.handler = null;
        }
    };
    var cf = d;
    var ff = b;
    var df = _;
    var pf = 'series\0';
    var gf = [
        'fontStyle',
        'fontWeight',
        'fontSize',
        'fontFamily',
        'rich',
        'tag',
        'color',
        'textBorderColor',
        'textBorderWidth',
        'width',
        'height',
        'lineHeight',
        'align',
        'verticalAlign',
        'baseline',
        'shadowColor',
        'shadowBlur',
        'shadowOffsetX',
        'shadowOffsetY',
        'textShadowColor',
        'textShadowBlur',
        'textShadowOffsetX',
        'textShadowOffsetY',
        'backgroundColor',
        'borderColor',
        'borderWidth',
        'borderRadius',
        'padding'
    ];
    var vf = 0;
    var mf = '.';
    var yf = '___EC__COMPONENT__CONTAINER___';
    var _f = 0;
    var xf = function (t) {
        for (var e = 0; e < t.length; e++) {
            t[e][1] || (t[e][1] = t[e][0]);
        }
        return function (e, n, i) {
            for (r = {}, a = 0, void 0; a < t.length; a++) {
                var r;
                var a;
                var o = t[a][1];
                if (!((n && h(n, o) >= 0) || (i && h(i, o) < 0))) {
                    var s = e.getShallow(o);
                    if (null != s) {
                        r[t[a][0]] = s;
                    }
                }
            }
            return r;
        };
    };
    var wf = xf([['lineWidth', 'width'], ['stroke', 'color'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']]);
    var bf = {
        getLineStyle: function (t) {
            var e = wf(this, t);
            var n = this.getLineDash(e.lineWidth);
            if (n) {
                e.lineDash = n;
            }
            return e;
        },
        getLineDash: function (t) {
            if (null == t) {
                t = 1;
            }
            var e = this.get('type');
            var n = Math.max(t, 2);
            var i = 4 * t;
            return 'solid' === e || null == e ? null : 'dashed' === e ? [i, i] : [n, n];
        }
    };
    var Mf = xf([['fill', 'color'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['opacity'], ['shadowColor']]);
    var Sf = {
        getAreaStyle: function (t, e) {
            return Mf(this, t, e);
        }
    };
    var Cf = Math.pow;
    var Tf = Math.sqrt;
    var kf = 1e-8;
    var Df = 0.0001;
    var If = Tf(3);
    var Af = 0.3333333333333333;
    var Lf = F();
    var Pf = F();
    var Of = F();
    var Ef = Math.min;
    var Rf = Math.max;
    var Bf = Math.sin;
    var zf = Math.cos;
    var Nf = 2 * Math.PI;
    var Ff = F();
    var Vf = F();
    var Wf = F();
    var Hf = [];
    var Gf = [];
    var qf = {
        M: 1,
        L: 2,
        C: 3,
        Q: 4,
        A: 5,
        Z: 6,
        R: 7
    };
    var Xf = [];
    var Uf = [];
    var Yf = [];
    var jf = [];
    var Zf = Math.min;
    var $f = Math.max;
    var Kf = Math.cos;
    var Qf = Math.sin;
    var Jf = Math.sqrt;
    var td = Math.abs;
    var ed = 'undefined' != typeof Float32Array;
    var nd = function (t) {
        this._saveData = !t;
        if (this._saveData) {
            this.setData([]);
        }
        this._ctx = null;
    };
    nd.prototype = {
        constructor: nd,
        _xi: 0,
        _yi: 0,
        _x0: 0,
        _y0: 0,
        _ux: 0,
        _uy: 0,
        _len: 0,
        _lineDash: null,
        _dashOffset: 0,
        _dashIdx: 0,
        _dashSum: 0,
        setScale: function (t, e) {
            this._ux = td(1 / hc / t) || 0;
            this._uy = td(1 / hc / e) || 0;
        },
        getContext: function () {
            return this._ctx;
        },
        beginPath: function (t) {
            this._ctx = t;
            if (t) {
                t.beginPath();
            }
            if (t) {
                this.dpr = t.dpr;
            }
            if (this._saveData) {
                this._len = 0;
            }
            if (this._lineDash) {
                this._lineDash = null;
                this._dashOffset = 0;
            }
            return this;
        },
        moveTo: function (t, e) {
            this.addData(qf.M, t, e);
            if (this._ctx) {
                this._ctx.moveTo(t, e);
            }
            this._x0 = t;
            this._y0 = e;
            this._xi = t;
            this._yi = e;
            return this;
        },
        lineTo: function (t, e) {
            var n = td(t - this._xi) > this._ux || td(e - this._yi) > this._uy || this._len < 5;
            this.addData(qf.L, t, e);
            if (this._ctx && n) {
                this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e);
            }
            if (n) {
                this._xi = t;
                this._yi = e;
            }
            return this;
        },
        bezierCurveTo: function (t, e, n, i, r, a) {
            this.addData(qf.C, t, e, n, i, r, a);
            if (this._ctx) {
                this._needsDash() ? this._dashedBezierTo(t, e, n, i, r, a) : this._ctx.bezierCurveTo(t, e, n, i, r, a);
            }
            this._xi = r;
            this._yi = a;
            return this;
        },
        quadraticCurveTo: function (t, e, n, i) {
            this.addData(qf.Q, t, e, n, i);
            if (this._ctx) {
                this._needsDash() ? this._dashedQuadraticTo(t, e, n, i) : this._ctx.quadraticCurveTo(t, e, n, i);
            }
            this._xi = n;
            this._yi = i;
            return this;
        },
        arc: function (t, e, n, i, r, a) {
            this.addData(qf.A, t, e, n, n, i, r - i, 0, a ? 0 : 1);
            if (this._ctx) {
                this._ctx.arc(t, e, n, i, r, a);
            }
            this._xi = Kf(r) * n + t;
            this._yi = Qf(r) * n + t;
            return this;
        },
        arcTo: function (t, e, n, i, r) {
            if (this._ctx) {
                this._ctx.arcTo(t, e, n, i, r);
            }
            return this;
        },
        rect: function (t, e, n, i) {
            if (this._ctx) {
                this._ctx.rect(t, e, n, i);
            }
            this.addData(qf.R, t, e, n, i);
            return this;
        },
        closePath: function () {
            this.addData(qf.Z);
            var t = this._ctx;
            var e = this._x0;
            var n = this._y0;
            if (t) {
                if (this._needsDash()) {
                    this._dashedLineTo(e, n);
                }
                t.closePath();
            }
            this._xi = e;
            this._yi = n;
            return this;
        },
        fill: function (t) {
            if (t) {
                t.fill();
            }
            this.toStatic();
        },
        stroke: function (t) {
            if (t) {
                t.stroke();
            }
            this.toStatic();
        },
        setLineDash: function (t) {
            if (t instanceof Array) {
                this._lineDash = t;
                this._dashIdx = 0;
                for (e = 0, n = 0, void 0; n < t.length; n++) {
                    var e;
                    var n;
                    e += t[n];
                }
                this._dashSum = e;
            }
            return this;
        },
        setLineDashOffset: function (t) {
            this._dashOffset = t;
            return this;
        },
        len: function () {
            return this._len;
        },
        setData: function (t) {
            var e = t.length;
            (this && this.length == e) || !ed || this.setData(new Float32Array(e));
            for (var n = 0; e > n; n++) {
                this[n] = t[n];
            }
            this._len = e;
        },
        appendPath: function (t) {
            t instanceof Array || (t = [t]);
            for (e = t.length, n = 0, i = this._len, r = 0, void 0; e > r; r++) {
                var e;
                var n;
                var i;
                var r;
                n += t[r].len();
            }
            if (ed && this instanceof Float32Array) {
                this.setData(new Float32Array(i + n));
            }
            for (var r = 0; e > r; r++) {
                for (a = t[r].data, o = 0, void 0; o < a.length; o++) {
                    var a;
                    var o;
                    this[i++] = a[o];
                }
            }
            this._len = i;
        },
        addData: function (t) {
            if (this._saveData) {
                var e = this;
                if (this._len + arguments.length > e.length) {
                    this._expandData();
                    e = this;
                }
                for (var n = 0; n < arguments.length; n++) {
                    e[this._len++] = arguments[n];
                }
                this._prevCmd = t;
            }
        },
        _expandData: function () {
            if (!(this instanceof Array)) {
                for (t = [], e = 0, void 0; e < this._len; e++) {
                    var t;
                    var e;
                    t[e] = this[e];
                }
                this.setData(t);
            }
        },
        _needsDash: function () {
            return this._lineDash;
        },
        _dashedLineTo: function (t, e) {
            var n;
            var i;
            var r = this._dashSum;
            var a = this._dashOffset;
            var o = this._lineDash;
            var s = this._ctx;
            var l = this._xi;
            var h = this._yi;
            var u = t - l;
            var c = e - h;
            var f = Jf(u * u + c * c);
            var d = l;
            var p = h;
            var g = o.length;
            for (
                u /= f, c /= f, 0 > a && (a = r + a), a %= r, d -= a * u, p -= a * c;
                (u > 0 && t >= d) || (0 > u && d >= t) || (0 == u && ((c > 0 && e >= p) || (0 > c && p >= e)));

            ) {
                i = this._dashIdx;
                n = o[i];
                d += u * n;
                p += c * n;
                this._dashIdx = (i + 1) % g;
                (u > 0 && l > d) ||
                    (0 > u && d > l) ||
                    (c > 0 && h > p) ||
                    (0 > c && p > h) ||
                    s[i % 2 ? 'moveTo' : 'lineTo'](u >= 0 ? Zf(d, t) : $f(d, t), c >= 0 ? Zf(p, e) : $f(p, e));
            }
            u = d - t;
            c = p - e;
            this._dashOffset = -Jf(u * u + c * c);
        },
        _dashedBezierTo: function (t, e, n, i, r, a) {
            var o;
            var s;
            var l;
            var h;
            var u;
            var c = this._dashSum;
            var f = this._dashOffset;
            var d = this._lineDash;
            var p = this._ctx;
            var g = this._xi;
            var v = this._yi;
            var m = Oi;
            var y = 0;
            var _ = this._dashIdx;
            var x = d.length;
            var w = 0;
            for (0 > f && (f = c + f), f %= c, o = 0; 1 > o; o += 0.1) {
                s = m(g, t, n, r, o + 0.1) - m(g, t, n, r, o);
                l = m(v, e, i, a, o + 0.1) - m(v, e, i, a, o);
                y += Jf(s * s + l * l);
            }
            for (; x > _ && ((w += d[_]), !(w > f)); _++) {}
            for (o = (w - f) / y; 1 >= o; ) {
                h = m(g, t, n, r, o);
                u = m(v, e, i, a, o);
                _ % 2 ? p.moveTo(h, u) : p.lineTo(h, u);
                o += d[_] / y;
                _ = (_ + 1) % x;
            }
            if (_ % 2 !== 0) {
                p.lineTo(r, a);
            }
            s = r - h;
            l = a - u;
            this._dashOffset = -Jf(s * s + l * l);
        },
        _dashedQuadraticTo: function (t, e, n, i) {
            var r = n;
            var a = i;
            n = (n + 2 * t) / 3;
            i = (i + 2 * e) / 3;
            t = (this._xi + 2 * t) / 3;
            e = (this._yi + 2 * e) / 3;
            this._dashedBezierTo(t, e, n, i, r, a);
        },
        toStatic: function () {
            var t = this;
            if (t instanceof Array) {
                t.length = this._len;
                if (ed) {
                    this.setData(new Float32Array(t));
                }
            }
        },
        getBoundingRect: function () {
            Xf[0] = Xf[1] = Yf[0] = Yf[1] = Number.MAX_VALUE;
            Uf[0] = Uf[1] = jf[0] = jf[1] = -Number.MAX_VALUE;
            for (t = this, e = 0, n = 0, i = 0, r = 0, a = 0, void 0; a < t.length; ) {
                var t;
                var e;
                var n;
                var i;
                var r;
                var a;
                var o = t[a++];
                switch ((1 == a && ((e = t[a]), (n = t[a + 1]), (i = e), (r = n)), o)) {
                    case qf.M:
                        i = t[a++];
                        r = t[a++];
                        e = i;
                        n = r;
                        Yf[0] = i;
                        Yf[1] = r;
                        jf[0] = i;
                        jf[1] = r;
                        break;
                    case qf.L:
                        Xi(e, n, t[a], t[a + 1], Yf, jf);
                        e = t[a++];
                        n = t[a++];
                        break;
                    case qf.C:
                        Ui(e, n, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], Yf, jf);
                        e = t[a++];
                        n = t[a++];
                        break;
                    case qf.Q:
                        Yi(e, n, t[a++], t[a++], t[a], t[a + 1], Yf, jf);
                        e = t[a++];
                        n = t[a++];
                        break;
                    case qf.A:
                        var s = t[a++];
                        var l = t[a++];
                        var h = t[a++];
                        var u = t[a++];
                        var c = t[a++];
                        var f = t[a++] + c;
                        var d = (t[a++], 1 - t[a++]);
                        if (1 == a) {
                            i = Kf(c) * h + s;
                            r = Qf(c) * u + l;
                        }
                        ji(s, l, h, u, c, f, d, Yf, jf);
                        e = Kf(f) * h + s;
                        n = Qf(f) * u + l;
                        break;
                    case qf.R:
                        i = e = t[a++];
                        r = n = t[a++];
                        var p = t[a++];
                        var g = t[a++];
                        Xi(i, r, i + p, r + g, Yf, jf);
                        break;
                    case qf.Z:
                        e = i;
                        n = r;
                }
                Q(Xf, Xf, Yf);
                J(Uf, Uf, jf);
            }
            if (0 === a) {
                Xf[0] = Xf[1] = Uf[0] = Uf[1] = 0;
            }
            return new Ve(Xf[0], Xf[1], Uf[0] - Xf[0], Uf[1] - Xf[1]);
        },
        rebuildPath: function (t) {
            for (s = this, l = this._ux, h = this._uy, u = this._len, c = 0, void 0; u > c; ) {
                var e;
                var n;
                var i;
                var r;
                var a;
                var o;
                var s;
                var l;
                var h;
                var u;
                var c;
                var f = s[c++];
                switch ((1 == c && ((i = s[c]), (r = s[c + 1]), (e = i), (n = r)), f)) {
                    case qf.M:
                        e = i = s[c++];
                        n = r = s[c++];
                        t.moveTo(i, r);
                        break;
                    case qf.L:
                        a = s[c++];
                        o = s[c++];
                        if (td(a - i) > l || td(o - r) > h || c === u - 1) {
                            t.lineTo(a, o);
                            i = a;
                            r = o;
                        }
                        break;
                    case qf.C:
                        t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]);
                        i = s[c - 2];
                        r = s[c - 1];
                        break;
                    case qf.Q:
                        t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]);
                        i = s[c - 2];
                        r = s[c - 1];
                        break;
                    case qf.A:
                        var d = s[c++];
                        var p = s[c++];
                        var g = s[c++];
                        var v = s[c++];
                        var m = s[c++];
                        var y = s[c++];
                        var _ = s[c++];
                        var x = s[c++];
                        var w = g > v ? g : v;
                        var b = g > v ? 1 : g / v;
                        var M = g > v ? v / g : 1;
                        var S = Math.abs(g - v) > 0.001;
                        var C = m + y;
                        S
                            ? (t.translate(d, p), t.rotate(_), t.scale(b, M), t.arc(0, 0, w, m, C, 1 - x), t.scale(1 / b, 1 / M), t.rotate(-_), t.translate(-d, -p))
                            : t.arc(d, p, w, m, C, 1 - x);
                        if (1 == c) {
                            e = Kf(m) * g + d;
                            n = Qf(m) * v + p;
                        }
                        i = Kf(C) * g + d;
                        r = Qf(C) * v + p;
                        break;
                    case qf.R:
                        e = i = s[c];
                        n = r = s[c + 1];
                        t.rect(s[c++], s[c++], s[c++], s[c++]);
                        break;
                    case qf.Z:
                        t.closePath();
                        i = e;
                        r = n;
                }
            }
        }
    };
    nd.CMD = qf;
    var id = 2 * Math.PI;
    var rd = 2 * Math.PI;
    var ad = nd.CMD;
    var od = 2 * Math.PI;
    var sd = 0.0001;
    var ld = [-1, -1, -1];
    var hd = [-1, -1];
    var ud = Dc.prototype.getCanvasPattern;
    var cd = Math.abs;
    var fd = new nd(true);
    // #ifdef MP-WEIXIN
    this.$scope.animate('shape', t);
    // #endif
    // #ifndef MP-WEIXIN
    hr.prototype = {
        constructor: hr,
        type: 'path',
        __dirtyPath: true,
        strokeContainThreshold: 5,
        brush: function (t, e) {
            var n = this.style;
            var i = this.path || fd;
            var r = n.hasStroke();
            var a = n.hasFill();
            var o = n.fill;
            var s = n.stroke;
            var l = a && !!o.colorStops;
            var h = r && !!s.colorStops;
            var u = a && !!o.image;
            var c = r && !!s.image;
            n.bind(t, this, e);
            this.setTransform(t);
            if (this.__dirty) {
                var f;
                if (l) {
                    f = f || this.getBoundingRect();
                    this._fillGradient = n.getGradient(t, o, f);
                }
                if (h) {
                    f = f || this.getBoundingRect();
                    this._strokeGradient = n.getGradient(t, s, f);
                }
            }
            l ? (t.fillStyle = this._fillGradient) : u && (t.fillStyle = ud.call(o, t));
            h ? (t.strokeStyle = this._strokeGradient) : c && (t.strokeStyle = ud.call(s, t));
            var d = n.lineDash;
            var p = n.lineDashOffset;
            var g = !!t.setLineDash;
            var v = this.getGlobalScale();
            i.setScale(v[0], v[1]);
            this.__dirtyPath || (d && !g && r)
                ? (i.beginPath(t), d && !g && (i.setLineDash(d), i.setLineDashOffset(p)), this.buildPath(i, this.shape, false), this.path && (this.__dirtyPath = false))
                : (t.beginPath(), this.path.rebuildPath(t));
            if (a) {
                i.fill(t);
            }
            if (d && g) {
                t.setLineDash(d);
                t.lineDashOffset = p;
            }
            if (r) {
                i.stroke(t);
            }
            if (d && g) {
                t.setLineDash([]);
            }
            if (null != n.text) {
                this.restoreTransform(t);
                this.drawRectText(t, this.getBoundingRect());
            }
        },
        buildPath: function () {},
        createPathProxy: function () {
            this.path = new nd();
        },
        getBoundingRect: function () {
            var t = this._rect;
            var e = this.style;
            var n = !t;
            if (n) {
                var i = this.path;
                i || (i = this.path = new nd());
                if (this.__dirtyPath) {
                    i.beginPath();
                    this.buildPath(i, this.shape, false);
                }
                t = i.getBoundingRect();
            }
            this._rect = t;
            if (e.hasStroke()) {
                var r = this._rectWithStroke || (this._rectWithStroke = t.clone());
                if (this.__dirty || n) {
                    r.copy(t);
                    var a = e.lineWidth;
                    var o = e.strokeNoScale ? this.getLineScale() : 1;
                    e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4));
                    if (o > 1e-10) {
                        r.width += a / o;
                        r.height += a / o;
                        r.x -= a / o / 2;
                        r.y -= a / o / 2;
                    }
                }
                return r;
            }
            return t;
        },
        contain: function (t, e) {
            var n = this.transformCoordToLocal(t, e);
            var i = this.getBoundingRect();
            var r = this.style;
            t = n[0];
            e = n[1];
            if (i.contain(t, e)) {
                var a = this.path.data;
                if (r.hasStroke()) {
                    var o = r.lineWidth;
                    var s = r.strokeNoScale ? this.getLineScale() : 1;
                    if (s > 1e-10 && (r.hasFill() || (o = Math.max(o, this.strokeContainThreshold)), lr(a, o / s, t, e))) {
                        return true;
                    }
                }
                if (r.hasFill()) {
                    return sr(a, t, e);
                }
            }
            return false;
        },
        dirty: function (t) {
            if (null == t) {
                t = true;
            }
            if (t) {
                this.__dirtyPath = t;
                this._rect = null;
            }
            this.__dirty = true;
            if (this.__zr) {
                this.__zr.refresh();
            }
            if (this.__clipTarget) {
                this.__clipTarget.dirty();
            }
        },
        animateShape: function (t) {
            return this.animate('shape', t);
        },
        attrKV: function (t, e) {
            'shape' === t ? (this.setShape(e), (this.__dirtyPath = true), (this._rect = null)) : Wn.prototype.attrKV.call(this, t, e);
        },
        setShape: function (t, e) {
            var n = this.shape;
            if (n) {
                if (b(t)) {
                    for (var i in t) {
                        if (t.hasOwnProperty(i)) {
                            n[i] = t[i];
                        }
                    }
                } else {
                    n[t] = e;
                }
                this.dirty(true);
            }
            return this;
        },
        getLineScale: function () {
            var t = this.transform;
            return t && cd(t[0] - 1) > 1e-10 && cd(t[3] - 1) > 1e-10 ? Math.sqrt(cd(t[0] * t[3] - t[2] * t[1])) : 1;
        }
    };
    // #endif
    hr.extend = function (t) {
        var e = function (e) {
            hr.call(this, e);
            if (t.style) {
                this.style.extendFrom(t.style, false);
            }
            var n = t.shape;
            if (n) {
                this.shape = this.shape || {};
                var i = this.shape;
                for (var r in n) {
                    if (!i.hasOwnProperty(r) && n.hasOwnProperty(r)) {
                        i[r] = n[r];
                    }
                }
            }
            if (t.init) {
                t.init.call(this, e);
            }
        };
        u(e, hr);
        for (var n in t) {
            if ('style' !== n && 'shape' !== n) {
                e.prototype[n] = t[n];
            }
        }
        return e;
    };
    u(hr, Wn);
    var dd = nd.CMD;
    var pd = [[], [], []];
    var gd = Math.sqrt;
    var vd = Math.atan2;
    var md = function (t, e) {
        var n;
        var i;
        var r;
        var a;
        var o;
        var s;
        var l = t.data;
        var h = dd.M;
        var u = dd.C;
        var c = dd.L;
        var f = dd.R;
        var d = dd.A;
        var p = dd.Q;
        for (r = 0, a = 0; r < l.length; ) {
            switch (((n = l[r++]), (a = r), (i = 0), n)) {
                case h:
                    i = 1;
                    break;
                case c:
                    i = 1;
                    break;
                case u:
                    i = 3;
                    break;
                case p:
                    i = 2;
                    break;
                case d:
                    var g = e[4];
                    var v = e[5];
                    var m = gd(e[0] * e[0] + e[1] * e[1]);
                    var y = gd(e[2] * e[2] + e[3] * e[3]);
                    var _ = vd(-e[1] / y, e[0] / m);
                    l[r] *= m;
                    l[r++] += g;
                    l[r] *= y;
                    l[r++] += v;
                    l[r++] *= m;
                    l[r++] *= y;
                    l[r++] += _;
                    l[r++] += _;
                    r += 2;
                    a = r;
                    break;
                case f:
                    s[0] = l[r++];
                    s[1] = l[r++];
                    K(s, s, e);
                    l[a++] = s[0];
                    l[a++] = s[1];
                    s[0] += l[r++];
                    s[1] += l[r++];
                    K(s, s, e);
                    l[a++] = s[0];
                    l[a++] = s[1];
            }
            for (o = 0; i > o; o++) {
                var s = pd[o];
                s[0] = l[r++];
                s[1] = l[r++];
                K(s, s, e);
                l[a++] = s[0];
                l[a++] = s[1];
            }
        }
    };
    var yd = ['m', 'M', 'l', 'L', 'v', 'V', 'h', 'H', 'z', 'Z', 'c', 'C', 'q', 'Q', 't', 'T', 's', 'S', 'a', 'A'];
    var _d = Math.sqrt;
    var xd = Math.sin;
    var wd = Math.cos;
    var bd = Math.PI;
    var Md = function (t) {
        return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
    };
    var Sd = function (t, e) {
        return (t[0] * e[0] + t[1] * e[1]) / (Md(t) * Md(e));
    };
    var Cd = function (t, e) {
        return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(Sd(t, e));
    };
    var Td = function (t) {
        Wn.call(this, t);
    };
    Td.prototype = {
        constructor: Td,
        type: 'text',
        brush: function (t, e) {
            var n = this.style;
            if (this.__dirty) {
                Mn(n, true);
            }
            n.fill = n.stroke = n.shadowBlur = n.shadowColor = n.shadowOffsetX = n.shadowOffsetY = null;
            var i = n.text;
            if (null != i) {
                i += '';
            }
            n.bind(t, this, e);
            if (Vn(i, n)) {
                this.setTransform(t);
                Cn(this, t, i, n);
                this.restoreTransform(t);
            }
        },
        getBoundingRect: function () {
            var t = this.style;
            if (this.__dirty) {
                Mn(t, true);
            }
            if (!this._rect) {
                var e = t.text;
                null != e ? (e += '') : (e = '');
                var n = on(t.text + '', t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.rich);
                n.x += t.x || 0;
                n.y += t.y || 0;
                if (Bn(t.textStroke, t.textStrokeWidth)) {
                    var i = t.textStrokeWidth;
                    n.x -= i / 2;
                    n.y -= i / 2;
                    n.width += i;
                    n.height += i;
                }
                this._rect = n;
            }
            return this._rect;
        }
    };
    u(Td, Wn);
    var kd = hr.extend({
        type: 'circle',
        shape: {
            cx: 0,
            cy: 0,
            r: 0
        },
        buildPath: function (t, e, n) {
            if (n) {
                t.moveTo(e.cx + e.r, e.cy);
            }
            t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, true);
        }
    });
    var Dd = [
        ['shadowBlur', 0],
        ['shadowColor', '#000'],
        ['shadowOffsetX', 0],
        ['shadowOffsetY', 0]
    ];
    var Id = function (t) {
        return bu.browser.ie && bu.browser.version >= 11
            ? function () {
                  var e;
                  var n = this.__clipPaths;
                  var i = this.style;
                  if (n) {
                      for (var r = 0; r < n.length; r++) {
                          var a = n[r];
                          var o = a && a.shape;
                          var s = a && a.type;
                          if (o && (('sector' === s && o.startAngle === o.endAngle) || ('rect' === s && (!o.width || !o.height)))) {
                              for (var l = 0; l < Dd.length; l++) {
                                  Dd[l][2] = i[Dd[l][0]];
                                  i[Dd[l][0]] = Dd[l][1];
                              }
                              e = true;
                              break;
                          }
                      }
                  }
                  t.apply(this, arguments);
                  if (e) {
                      for (var l = 0; l < Dd.length; l++) {
                          i[Dd[l][0]] = Dd[l][2];
                      }
                  }
              }
            : t;
    };
    var Ad = hr.extend({
        type: 'sector',
        shape: {
            cx: 0,
            cy: 0,
            r0: 0,
            r: 0,
            startAngle: 0,
            endAngle: 2 * Math.PI,
            clockwise: true
        },
        brush: Id(hr.prototype.brush),
        buildPath: function (t, e) {
            var n = e.cx;
            var i = e.cy;
            var r = Math.max(e.r0 || 0, 0);
            var a = Math.max(e.r, 0);
            var o = e.startAngle;
            var s = e.endAngle;
            var l = e.clockwise;
            var h = Math.cos(o);
            var u = Math.sin(o);
            t.moveTo(h * r + n, u * r + i);
            t.lineTo(h * a + n, u * a + i);
            t.arc(n, i, a, o, s, !l);
            t.lineTo(Math.cos(s) * r + n, Math.sin(s) * r + i);
            if (0 !== r) {
                t.arc(n, i, r, s, o, l);
            }
            t.closePath();
        }
    });
    hr.extend({
        type: 'ring',
        shape: {
            cx: 0,
            cy: 0,
            r: 0,
            r0: 0
        },
        buildPath: function (t, e) {
            var n = e.cx;
            var i = e.cy;
            var r = 2 * Math.PI;
            t.moveTo(n + e.r, i);
            t.arc(n, i, e.r, 0, r, false);
            t.moveTo(n + e.r0, i);
            t.arc(n, i, e.r0, 0, r, true);
        }
    });
    var Ld = function (t, e) {
        for (n = t.length, i = [], r = 0, a = 1, void 0; n > a; a++) {
            var n;
            var i;
            var r;
            var a;
            r += Z(t[a - 1], t[a]);
        }
        var o = r / 2;
        o = n > o ? n : o;
        for (var a = 0; o > a; a++) {
            var s;
            var l;
            var h;
            var u = (a / (o - 1)) * (e ? n : n - 1);
            var c = Math.floor(u);
            var f = u - c;
            var d = t[c % n];
            e
                ? ((s = t[(c - 1 + n) % n]), (l = t[(c + 1) % n]), (h = t[(c + 2) % n]))
                : ((s = t[0 === c ? c : c - 1]), (l = t[c > n - 2 ? n - 1 : c + 1]), (h = t[c > n - 3 ? n - 1 : c + 2]));
            var p = f * f;
            var g = f * p;
            i.push([pr(s[0], d[0], l[0], h[0], f, p, g), pr(s[1], d[1], l[1], h[1], f, p, g)]);
        }
        return i;
    };
    var Pd = function (t, e, n, i) {
        var r;
        var a;
        var o;
        var s;
        var l = [];
        var h = [];
        var u = [];
        var c = [];
        if (i) {
            o = [1 / 0, 1 / 0];
            s = [-1 / 0, -1 / 0];
            for (f = 0, d = t.length, void 0; d > f; f++) {
                var f;
                var d;
                Q(o, o, t[f]);
                J(s, s, t[f]);
            }
            Q(o, o, i[0]);
            J(s, s, i[1]);
        }
        for (f = 0, d = t.length, void 0; d > f; f++) {
            var f;
            var d;
            var p = t[f];
            if (n) {
                r = t[f ? f - 1 : d - 1];
                a = t[(f + 1) % d];
            } else {
                if (0 === f || f === d - 1) {
                    l.push(W(t[f]));
                    continue;
                }
                r = t[f - 1];
                a = t[f + 1];
            }
            q(h, a, r);
            Y(h, h, e);
            var g = Z(p, r);
            var v = Z(p, a);
            var m = g + v;
            if (0 !== m) {
                g /= m;
                v /= m;
            }
            Y(u, h, -g);
            Y(c, h, v);
            var y = H([], p, u);
            var _ = H([], p, c);
            if (i) {
                J(y, y, o);
                Q(y, y, s);
                J(_, _, o);
                Q(_, _, s);
            }
            l.push(y);
            l.push(_);
        }
        if (n) {
            l.push(l.shift());
        }
        return l;
    };
    hr.extend({
        type: 'polygon',
        shape: {
            points: null,
            smooth: false,
            smoothConstraint: null
        },
        buildPath: function (t, e) {
            gr(t, e, true);
        }
    });
    hr.extend({
        type: 'polyline',
        shape: {
            points: null,
            smooth: false,
            smoothConstraint: null
        },
        style: {
            stroke: '#000',
            fill: null
        },
        buildPath: function (t, e) {
            gr(t, e, false);
        }
    });
    var Od = hr.extend({
        type: 'rect',
        shape: {
            r: 0,
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        buildPath: function (t, e) {
            var n = e.x;
            var i = e.y;
            var r = e.width;
            var a = e.height;
            e.r ? bn(t, e) : t.rect(n, i, r, a);
            t.closePath();
        }
    });
    var Ed = hr.extend({
        type: 'line',
        shape: {
            x1: 0,
            y1: 0,
            x2: 0,
            y2: 0,
            percent: 1
        },
        style: {
            stroke: '#000',
            fill: null
        },
        buildPath: function (t, e) {
            var n = e.x1;
            var i = e.y1;
            var r = e.x2;
            var a = e.y2;
            var o = e.percent;
            if (0 !== o) {
                t.moveTo(n, i);
                if (1 > o) {
                    (r = n * (1 - o) + r * o), (a = i * (1 - o) + a * o);
                }
                t.lineTo(r, a);
            }
        },
        pointAt: function (t) {
            var e = this.shape;
            return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t];
        }
    });
    var Rd = [];
    hr.extend({
        type: 'bezier-curve',
        shape: {
            x1: 0,
            y1: 0,
            x2: 0,
            y2: 0,
            cpx1: 0,
            cpy1: 0,
            percent: 1
        },
        style: {
            stroke: '#000',
            fill: null
        },
        buildPath: function (t, e) {
            var n = e.x1;
            var i = e.y1;
            var r = e.x2;
            var a = e.y2;
            var o = e.cpx1;
            var s = e.cpy1;
            var l = e.cpx2;
            var h = e.cpy2;
            var u = e.percent;
            if (0 !== u) {
                t.moveTo(n, i);
                null == l || null == h
                    ? (1 > u && (Gi(n, o, r, u, Rd), (o = Rd[1]), (r = Rd[2]), Gi(i, s, a, u, Rd), (s = Rd[1]), (a = Rd[2])), t.quadraticCurveTo(o, s, r, a))
                    : (1 > u && (zi(n, o, l, r, u, Rd), (o = Rd[1]), (l = Rd[2]), (r = Rd[3]), zi(i, s, h, a, u, Rd), (s = Rd[1]), (h = Rd[2]), (a = Rd[3])),
                      t.bezierCurveTo(o, s, l, h, r, a));
            }
        },
        pointAt: function (t) {
            return vr(this.shape, t, false);
        },
        tangentAt: function (t) {
            var e = vr(this.shape, t, true);
            return j(e, e);
        }
    });
    var Bd = hr.extend({
        type: 'arc',
        shape: {
            cx: 0,
            cy: 0,
            r: 0,
            startAngle: 0,
            endAngle: 2 * Math.PI,
            clockwise: true
        },
        style: {
            stroke: '#000',
            fill: null
        },
        buildPath: function (t, e) {
            var n = e.cx;
            var i = e.cy;
            var r = Math.max(e.r, 0);
            var a = e.startAngle;
            var o = e.endAngle;
            var s = e.clockwise;
            var l = Math.cos(a);
            var h = Math.sin(a);
            t.moveTo(l * r + n, h * r + i);
            t.arc(n, i, r, a, o, !s);
        }
    });
    hr.extend({
        type: 'compound',
        shape: {
            paths: null
        },
        _updatePathDirty: function () {
            for (t = this.__dirtyPath, e = this.shape.paths, n = 0, void 0; n < e.length; n++) {
                var t;
                var e;
                var n;
                t = t || e[n].__dirtyPath;
            }
            this.__dirtyPath = t;
            this.__dirty = this.__dirty || t;
        },
        beforeBrush: function () {
            this._updatePathDirty();
            for (t = this.shape.paths || [], e = this.getGlobalScale(), n = 0, void 0; n < t.length; n++) {
                var t;
                var e;
                var n;
                t[n].path || t[n].createPathProxy();
                t[n].path.setScale(e[0], e[1]);
            }
        },
        buildPath: function (t, e) {
            for (n = e.paths || [], i = 0, void 0; i < n.length; i++) {
                var n;
                var i;
                n[i].buildPath(t, n[i].shape, true);
            }
        },
        afterBrush: function () {
            for (t = this.shape.paths || [], e = 0, void 0; e < t.length; e++) {
                var t;
                var e;
                t[e].__dirtyPath = false;
            }
        },
        getBoundingRect: function () {
            this._updatePathDirty();
            return hr.prototype.getBoundingRect.call(this);
        }
    });
    var zd = function (t) {
        this.colorStops = t || [];
    };
    zd.prototype = {
        constructor: zd,
        addColorStop: function (t, e) {
            this.colorStops.push({
                offset: t,
                color: e
            });
        }
    };
    var Nd = function (t, e, n, i, r, a) {
        this.x = null == t ? 0 : t;
        this.y = null == e ? 0 : e;
        this.x2 = null == n ? 1 : n;
        this.y2 = null == i ? 0 : i;
        this.type = 'linear';
        this.global = a || false;
        zd.call(this, r);
    };
    Nd.prototype = {
        constructor: Nd
    };
    u(Nd, zd);
    var Fd = function (t, e, n, i, r) {
        this.x = null == t ? 0.5 : t;
        this.y = null == e ? 0.5 : e;
        this.r = null == n ? 0.5 : n;
        this.type = 'radial';
        this.global = r || false;
        zd.call(this, i);
    };
    Fd.prototype = {
        constructor: Fd
    };
    u(Fd, zd);
    mr.prototype.incremental = true;
    mr.prototype.clearDisplaybles = function () {
        this._displayables = [];
        this._temporaryDisplayables = [];
        this._cursor = 0;
        this.dirty();
        this.notClear = false;
    };
    mr.prototype.addDisplayable = function (t, e) {
        e ? this._temporaryDisplayables.push(t) : this._displayables.push(t);
        this.dirty();
    };
    mr.prototype.addDisplayables = function (t, e) {
        e = e || false;
        for (var n = 0; n < t.length; n++) {
            this.addDisplayable(t[n], e);
        }
    };
    mr.prototype.eachPendingDisplayable = function (t) {
        for (var e = this._cursor; e < this._displayables.length; e++) {
            if (t) {
                t(this._displayables[e]);
            }
        }
        for (var e = 0; e < this._temporaryDisplayables.length; e++) {
            if (t) {
                t(this._temporaryDisplayables[e]);
            }
        }
    };
    mr.prototype.update = function () {
        this.updateTransform();
        for (var t = this._cursor; t < this._displayables.length; t++) {
            var e = this._displayables[t];
            e.parent = this;
            e.update();
            e.parent = null;
        }
        for (var t = 0; t < this._temporaryDisplayables.length; t++) {
            var e = this._temporaryDisplayables[t];
            e.parent = this;
            e.update();
            e.parent = null;
        }
    };
    mr.prototype.brush = function (t) {
        for (var e = this._cursor; e < this._displayables.length; e++) {
            var n = this._displayables[e];
            if (n.beforeBrush) {
                n.beforeBrush(t);
            }
            n.brush(t, e === this._cursor ? null : this._displayables[e - 1]);
            if (n.afterBrush) {
                n.afterBrush(t);
            }
        }
        this._cursor = e;
        for (var e = 0; e < this._temporaryDisplayables.length; e++) {
            var n = this._temporaryDisplayables[e];
            if (n.beforeBrush) {
                n.beforeBrush(t);
            }
            n.brush(t, 0 === e ? null : this._temporaryDisplayables[e - 1]);
            if (n.afterBrush) {
                n.afterBrush(t);
            }
        }
        this._temporaryDisplayables = [];
        this.notClear = true;
    };
    var Vd = [];
    mr.prototype.getBoundingRect = function () {
        if (!this._rect) {
            for (t = new Ve(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0, void 0; e < this._displayables.length; e++) {
                var t;
                var e;
                var n = this._displayables[e];
                var i = n.getBoundingRect().clone();
                if (n.needLocalTransform()) {
                    i.applyTransform(n.getLocalTransform(Vd));
                }
                t.union(i);
            }
            this._rect = t;
        }
        return this._rect;
    };
    mr.prototype.contain = function (t, e) {
        var n = this.transformCoordToLocal(t, e);
        var i = this.getBoundingRect();
        if (i.contain(n[0], n[1])) {
            for (var r = 0; r < this._displayables.length; r++) {
                var a = this._displayables[r];
                if (a.contain(t, e)) {
                    return true;
                }
            }
        }
        return false;
    };
    u(mr, Wn);
    var Wd = Math.round;
    var Hd = {};
    var Gd = ['textStyle', 'color'];
    var qd = {
        getTextColor: function (t) {
            var e = this.ecModel;
            return this.getShallow('color') || (!t && e ? e.get(Gd) : null);
        },
        getFont: function () {
            return Ur(
                {
                    fontStyle: this.getShallow('fontStyle'),
                    fontWeight: this.getShallow('fontWeight'),
                    fontSize: this.getShallow('fontSize'),
                    fontFamily: this.getShallow('fontFamily')
                },
                this.ecModel
            );
        },
        getTextRect: function (t) {
            return on(
                t,
                this.getFont(),
                this.getShallow('align'),
                this.getShallow('verticalAlign') || this.getShallow('baseline'),
                this.getShallow('padding'),
                this.getShallow('rich'),
                this.getShallow('truncateText')
            );
        }
    };
    var Xd = xf([
        ['fill', 'color'],
        ['stroke', 'borderColor'],
        ['lineWidth', 'borderWidth'],
        ['opacity'],
        ['shadowBlur'],
        ['shadowOffsetX'],
        ['shadowOffsetY'],
        ['shadowColor'],
        ['textPosition'],
        ['textAlign']
    ]);
    var Ud = {
        getItemStyle: function (t, e) {
            var n = Xd(this, t, e);
            var i = this.getBorderLineDash();
            if (i) {
                n.lineDash = i;
            }
            return n;
        },
        getBorderLineDash: function () {
            var t = this.get('borderType');
            return 'solid' === t || null == t ? null : 'dashed' === t ? [5, 5] : [1, 1];
        }
    };
    var Yd = c;
    var jd = _i();
    Kr.prototype = {
        constructor: Kr,
        init: null,
        mergeOption: function (t) {
            r(this.option, t, true);
        },
        get: function (t, e) {
            return null == t ? this.option : Qr(this.option, this.parsePath(t), !e && Jr(this, t));
        },
        getShallow: function (t, e) {
            var n = this.option;
            var i = null == n ? n : n[t];
            var r = !e && Jr(this, t);
            if (null == i && r) {
                i = r.getShallow(t);
            }
            return i;
        },
        getModel: function (t, e) {
            var n;
            var i = null == t ? this.option : Qr(this.option, (t = this.parsePath(t)));
            e = e || ((n = Jr(this, t)) && n.getModel(t));
            return new Kr(i, e, this.ecModel);
        },
        isEmpty: function () {
            return null == this.option;
        },
        restoreData: function () {},
        clone: function () {
            var t = this.constructor;
            return new t(i(this.option));
        },
        setReadOnly: function () {},
        parsePath: function (t) {
            if ('string' == typeof t) {
                t = t.split('.');
            }
            return t;
        },
        customizeGetParent: function (t) {
            jd(this).getParent = t;
        },
        isAnimationEnabled: function () {
            if (!bu.node) {
                if (null != this.option.animation) {
                    return !!this.option.animation;
                }
                if (this.parentModel) {
                    return this.parentModel.isAnimationEnabled();
                }
            }
        }
    };
    Ti(Kr);
    ki(Kr);
    Yd(Kr, bf);
    Yd(Kr, Sf);
    Yd(Kr, qd);
    Yd(Kr, Ud);
    var Zd = 0;
    var $d = 0.0001;
    var Kd = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
    var Qd = L;
    var Jd = /([&<>"'])/g;
    var tp = {
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        "'": '&#39;'
    };
    var ep = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
    var np = function (t, e) {
        return '{' + t + (null == e ? '' : e) + '}';
    };
    var ip = fn;
    var rp = d;
    var ap = ['left', 'right', 'top', 'bottom', 'width', 'height'];
    var op = [
        ['width', 'left', 'right'],
        ['height', 'top', 'bottom']
    ];
    var sp =
        (y(wa, 'vertical'),
        y(wa, 'horizontal'),
        {
            getBoxLayoutParams: function () {
                return {
                    left: this.get('left'),
                    top: this.get('top'),
                    right: this.get('right'),
                    bottom: this.get('bottom'),
                    width: this.get('width'),
                    height: this.get('height')
                };
            }
        });
    var lp = _i();
    var hp = Kr.extend({
        type: 'component',
        id: '',
        name: '',
        mainType: '',
        subType: '',
        componentIndex: 0,
        defaultOption: null,
        ecModel: null,
        dependentModels: [],
        uid: null,
        layoutMode: null,
        $constructor: function (t, e, n, i) {
            Kr.call(this, t, e, n, i);
            this.uid = ta('ec_cpt_model');
        },
        init: function (t, e, n) {
            this.mergeDefaultAndTheme(t, n);
        },
        mergeDefaultAndTheme: function (t, e) {
            var n = this.layoutMode;
            var i = n ? Sa(t) : {};
            var a = e.getTheme();
            r(t, a.get(this.mainType));
            r(t, this.getDefaultOption());
            if (n) {
                Ma(t, i, n);
            }
        },
        mergeOption: function (t) {
            r(this.option, t, true);
            var e = this.layoutMode;
            if (e) {
                Ma(this.option, t, e);
            }
        },
        optionUpdated: function () {},
        getDefaultOption: function () {
            var t = lp(this);
            if (!t.defaultOption) {
                for (e = [], n = this.constructor, void 0; n; ) {
                    var e;
                    var n;
                    var i = n.prototype.defaultOption;
                    if (i) {
                        e.push(i);
                    }
                    n = n.superClass;
                }
                for (a = {}, o = e.length - 1, void 0; o >= 0; o--) {
                    var a;
                    var o;
                    a = r(a, e[o], true);
                }
                t.defaultOption = a;
            }
            return t.defaultOption;
        },
        getReferringComponents: function (t) {
            return this.ecModel.queryComponents({
                mainType: t,
                index: this.get(t + 'Index', true),
                id: this.get(t + 'Id', true)
            });
        }
    });
    Ai(hp, {
        registerWhenExtend: true
    });
    ea(hp);
    na(hp, Ta);
    c(hp, sp);
    var up = '';
    if ('undefined' != typeof navigator) {
        up = navigator.platform || '';
    }
    var cp = {
        color: ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'],
        gradientColor: ['#f6efa6', '#d88273', '#bf444c'],
        textStyle: {
            fontFamily: up.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',
            fontSize: 12,
            fontStyle: 'normal',
            fontWeight: 'normal'
        },
        blendMode: null,
        animation: 'auto',
        animationDuration: 1000,
        animationDurationUpdate: 300,
        animationEasing: 'exponentialOut',
        animationEasingUpdate: 'cubicOut',
        animationThreshold: 2000,
        progressiveThreshold: 3000,
        progressive: 400,
        hoverLayerThreshold: 3000,
        useUTC: false
    };
    var fp = _i();
    var dp = {
        clearColorPalette: function () {
            fp(this).colorIdx = 0;
            fp(this).colorNameMap = {};
        },
        getColorFromPalette: function (t, e, n) {
            e = e || this;
            var i = fp(e);
            var r = i.colorIdx || 0;
            var a = (i.colorNameMap = i.colorNameMap || {});
            if (a.hasOwnProperty(t)) {
                return a[t];
            }
            var o = ui(this.get('color', true));
            var s = this.get('colorLayer', true);
            var l = null != n && s ? ka(s, n) : o;
            l = l || o;
            if (l && l.length) {
                var h = l[r];
                if (t) {
                    a[t] = h;
                }
                i.colorIdx = (r + 1) % l.length;
                return h;
            }
        }
    };
    var pp = {
        cartesian2d: function (t, e, n, i) {
            var r = t.getReferringComponents('xAxis')[0];
            var a = t.getReferringComponents('yAxis')[0];
            e.coordSysDims = ['x', 'y'];
            n.set('x', r);
            n.set('y', a);
            if (Ia(r)) {
                i.set('x', r);
                e.firstCategoryDimIndex = 0;
            }
            if (Ia(a)) {
                i.set('y', a);
                e.firstCategoryDimIndex = 1;
            }
        },
        singleAxis: function (t, e, n, i) {
            var r = t.getReferringComponents('singleAxis')[0];
            e.coordSysDims = ['single'];
            n.set('single', r);
            if (Ia(r)) {
                i.set('single', r);
                e.firstCategoryDimIndex = 0;
            }
        },
        polar: function (t, e, n, i) {
            var r = t.getReferringComponents('polar')[0];
            var a = r.findAxisModel('radiusAxis');
            var o = r.findAxisModel('angleAxis');
            e.coordSysDims = ['radius', 'angle'];
            n.set('radius', a);
            n.set('angle', o);
            if (Ia(a)) {
                i.set('radius', a);
                e.firstCategoryDimIndex = 0;
            }
            if (Ia(o)) {
                i.set('angle', o);
                e.firstCategoryDimIndex = 1;
            }
        },
        geo: function (t, e) {
            e.coordSysDims = ['lng', 'lat'];
        },
        parallel: function (t, e, n, i) {
            var r = t.ecModel;
            var a = r.getComponent('parallel', t.get('parallelIndex'));
            var o = (e.coordSysDims = a.dimensions.slice());
            d(a.parallelAxisIndex, function (t, a) {
                var s = r.getComponent('parallelAxis', t);
                var l = o[a];
                n.set(l, s);
                if (Ia(s) && null == e.firstCategoryDimIndex) {
                    i.set(l, s);
                    e.firstCategoryDimIndex = a;
                }
            });
        }
    };
    var gp = 'original';
    var vp = 'arrayRows';
    var mp = 'objectRows';
    var yp = 'keyedColumns';
    var _p = 'unknown';
    var xp = 'typedArray';
    var wp = 'column';
    var bp = 'row';
    Aa.seriesDataToSource = function (t) {
        return new Aa({
            data: t,
            sourceFormat: S(t) ? xp : gp,
            fromDataset: false
        });
    };
    ki(Aa);
    var Mp = _i();
    var Sp = '\0_ec_inner';
    var Cp = Kr.extend({
        init: function (t, e, n, i) {
            n = n || {};
            this.option = null;
            this._theme = new Kr(n);
            this._optionManager = i;
        },
        setOption: function (t, e) {
            P(!(Sp in t), 'please use chart.getOption()');
            this._optionManager.setOption(t, e);
            this.resetOption(null);
        },
        resetOption: function (t) {
            var e = false;
            var n = this._optionManager;
            if (!t || 'recreate' === t) {
                var i = n.mountOption('recreate' === t);
                this.option && 'recreate' !== t ? (this.restoreData(), this.mergeOption(i)) : Xa.call(this, i);
                e = true;
            }
            if ('timeline' === t || 'media' === t) {
                this.restoreData();
            }
            if (!t || 'recreate' === t || 'timeline' === t) {
                var r = n.getTimelineOption(this);
                if (r) {
                    this.mergeOption(r);
                    e = true;
                }
            }
            if (!t || 'recreate' === t || 'media' === t) {
                var a = n.getMediaOption(this, this._api);
                if (a.length) {
                    d(
                        a,
                        function (t) {
                            this.mergeOption(t, (e = true));
                        },
                        this
                    );
                }
            }
            return e;
        },
        mergeOption: function (t) {
            function e(e, i) {
                var r = ui(t[e]);
                var s = pi(a.get(e), r);
                gi(s);
                d(s, function (t) {
                    var n = t.option;
                    if (b(n)) {
                        t.keyInfo.mainType = e;
                        t.keyInfo.subType = Ya(e, n, t.exist);
                    }
                });
                var l = Ua(a, i);
                n[e] = [];
                a.set(e, []);
                d(
                    s,
                    function (t, i) {
                        var r = t.exist;
                        var s = t.option;
                        P(b(s) || r, 'Empty component definition');
                        if (s) {
                            var h = hp.getClass(e, t.keyInfo.subType, true);
                            if (r && r instanceof h) {
                                r.name = t.keyInfo.name;
                                r.mergeOption(s, this);
                                r.optionUpdated(s, false);
                            } else {
                                var u = o(
                                    {
                                        dependentModels: l,
                                        componentIndex: i
                                    },
                                    t.keyInfo
                                );
                                r = new h(s, this, this, u);
                                o(r, u);
                                r.init(s, this, this, u);
                                r.optionUpdated(null, true);
                            }
                        } else {
                            r.mergeOption({}, this);
                            r.optionUpdated({}, false);
                        }
                        a.get(e)[i] = r;
                        n[e][i] = r.option;
                    },
                    this
                );
                if ('series' === e) {
                    ja(this, a.get('series'));
                }
            }
            var n = this.option;
            var a = this._componentsMap;
            var s = [];
            Oa(this);
            d(t, function (t, e) {
                if (null != t) {
                    hp.hasClass(e) ? e && s.push(e) : (n[e] = null == n[e] ? i(t) : r(n[e], t, true));
                }
            });
            hp.topologicalTravel(s, hp.getAllClassMainTypes(), e, this);
            this._seriesIndicesMap = z((this._seriesIndices = this._seriesIndices || []));
        },
        getOption: function () {
            var t = i(this.option);
            d(t, function (e, n) {
                if (hp.hasClass(n)) {
                    for (e = ui(e), i = e.length - 1, void 0; i >= 0; i--) {
                        var e;
                        var i;
                        if (mi(e[i])) {
                            e.splice(i, 1);
                        }
                    }
                    t[n] = e;
                }
            });
            delete t[Sp];
            return t;
        },
        getTheme: function () {
            return this._theme;
        },
        getComponent: function (t, e) {
            var n = this._componentsMap.get(t);
            return n ? n[e || 0] : void 0;
        },
        queryComponents: function (t) {
            var e = t.mainType;
            if (!e) {
                return [];
            }
            var n = t.index;
            var i = t.id;
            var r = t.name;
            var a = this._componentsMap.get(e);
            if (!a || !a.length) {
                return [];
            }
            var o;
            if (null != n) {
                _(n) || (n = [n]);
                o = v(
                    p(n, function (t) {
                        return a[t];
                    }),
                    function (t) {
                        return !!t;
                    }
                );
            } else if (null != i) {
                var s = _(i);
                o = v(a, function (t) {
                    return (s && h(i, t.id) >= 0) || (!s && t.id === i);
                });
            } else if (null != r) {
                var l = _(r);
                o = v(a, function (t) {
                    return (l && h(r, t.name) >= 0) || (!l && t.name === r);
                });
            } else {
                o = a.slice();
            }
            return Za(o, t);
        },
        findComponents: function (t) {
            function e(t) {
                var e = r + 'Index';
                var n = r + 'Id';
                var i = r + 'Name';
                return !t || (null == t[e] && null == t[n] && null == t[i])
                    ? null
                    : {
                          mainType: r,
                          index: t[e],
                          id: t[n],
                          name: t[i]
                      };
            }
            function n(e) {
                return t.filter ? v(e, t.filter) : e;
            }
            var i = t.query;
            var r = t.mainType;
            var a = e(i);
            var o = a ? this.queryComponents(a) : this._componentsMap.get(r);
            return n(Za(o, t));
        },
        eachComponent: function (t, e, n) {
            var i = this._componentsMap;
            if ('function' == typeof t) {
                n = e;
                e = t;
                i.each(function (t, i) {
                    d(t, function (t, r) {
                        e.call(n, i, t, r);
                    });
                });
            } else if (w(t)) d(i.get(t), e, n);
            else if (b(t)) {
                var r = this.findComponents(t);
                d(r, e, n);
            }
        },
        getSeriesByName: function (t) {
            var e = this._componentsMap.get('series');
            return v(e, function (e) {
                return e.name === t;
            });
        },
        getSeriesByIndex: function (t) {
            return this._componentsMap.get('series')[t];
        },
        getSeriesByType: function (t) {
            var e = this._componentsMap.get('series');
            return v(e, function (e) {
                return e.subType === t;
            });
        },
        getSeries: function () {
            return this._componentsMap.get('series').slice();
        },
        getSeriesCount: function () {
            return this._componentsMap.get('series').length;
        },
        eachSeries: function (t, e) {
            d(
                this._seriesIndices,
                function (n) {
                    var i = this._componentsMap.get('series')[n];
                    t.call(e, i, n);
                },
                this
            );
        },
        eachRawSeries: function (t, e) {
            d(this._componentsMap.get('series'), t, e);
        },
        eachSeriesByType: function (t, e, n) {
            d(
                this._seriesIndices,
                function (i) {
                    var r = this._componentsMap.get('series')[i];
                    if (r.subType === t) {
                        e.call(n, r, i);
                    }
                },
                this
            );
        },
        eachRawSeriesByType: function (t, e, n) {
            return d(this.getSeriesByType(t), e, n);
        },
        isSeriesFiltered: function (t) {
            return null == this._seriesIndicesMap.get(t.componentIndex);
        },
        getCurrentSeriesIndices: function () {
            return (this._seriesIndices || []).slice();
        },
        filterSeries: function (t, e) {
            var n = v(this._componentsMap.get('series'), t, e);
            ja(this, n);
        },
        restoreData: function (t) {
            var e = this._componentsMap;
            ja(this, e.get('series'));
            var n = [];
            e.each(function (t, e) {
                n.push(e);
            });
            hp.topologicalTravel(n, hp.getAllClassMainTypes(), function (n) {
                d(e.get(n), function (e) {
                    if ('series' !== n || !Ga(e, t)) {
                        e.restoreData();
                    }
                });
            });
        }
    });
    c(Cp, dp);
    var Tp = [
        'getDom',
        'getZr',
        'getWidth',
        'getHeight',
        'getDevicePixelRatio',
        'dispatchAction',
        'isDisposed',
        'on',
        'off',
        'getDataURL',
        'getConnectedDataURL',
        'getModel',
        'getOption',
        'getViewOfComponentModel',
        'getViewOfSeriesModel'
    ];
    var kp = {};
    Ka.prototype = {
        constructor: Ka,
        create: function (t, e) {
            var n = [];
            d(kp, function (i) {
                var r = i.create(t, e);
                n = n.concat(r || []);
            });
            this._coordinateSystems = n;
        },
        update: function (t, e) {
            d(this._coordinateSystems, function (n) {
                if (n.update) {
                    n.update(t, e);
                }
            });
        },
        getCoordinateSystems: function () {
            return this._coordinateSystems.slice();
        }
    };
    Ka.register = function (t, e) {
        kp[t] = e;
    };
    Ka.get = function (t) {
        return kp[t];
    };
    var Dp = d;
    var Ip = i;
    var Ap = p;
    var Lp = r;
    var Pp = /^(min|max)?(.+)$/;
    Qa.prototype = {
        constructor: Qa,
        setOption: function (t, e) {
            if (t) {
                d(ui(t.series), function (t) {
                    if (t && t.data && S(t.data)) {
                        E(t.data);
                    }
                });
            }
            t = Ip(t, true);
            var n = this._optionBackup;
            var i = Ja.call(this, t, e, !n);
            this._newBaseOption = i.baseOption;
            n
                ? (io(n.baseOption, i.baseOption),
                  i.timelineOptions.length && (n.timelineOptions = i.timelineOptions),
                  i.mediaList.length && (n.mediaList = i.mediaList),
                  i.mediaDefault && (n.mediaDefault = i.mediaDefault))
                : (this._optionBackup = i);
        },
        mountOption: function (t) {
            var e = this._optionBackup;
            this._timelineOptions = Ap(e.timelineOptions, Ip);
            this._mediaList = Ap(e.mediaList, Ip);
            this._mediaDefault = Ip(e.mediaDefault);
            this._currentMediaIndices = [];
            return Ip(t ? e.baseOption : this._newBaseOption);
        },
        getTimelineOption: function (t) {
            var e;
            var n = this._timelineOptions;
            if (n.length) {
                var i = t.getComponent('timeline');
                if (i) {
                    e = Ip(n[i.getCurrentIndex()], true);
                }
            }
            return e;
        },
        getMediaOption: function () {
            var t = this._api.getWidth();
            var e = this._api.getHeight();
            var n = this._mediaList;
            var i = this._mediaDefault;
            var r = [];
            var a = [];
            if (!n.length && !i) {
                return a;
            }
            for (o = 0, s = n.length, void 0; s > o; o++) {
                var o;
                var s;
                if (to(n[o].query, t, e)) {
                    r.push(o);
                }
            }
            if (!r.length && i) {
                r = [-1];
            }
            if (r.length && !no(r, this._currentMediaIndices)) {
                a = Ap(r, function (t) {
                    return Ip(-1 === t ? i.option : n[t].option);
                });
            }
            this._currentMediaIndices = r;
            return a;
        }
    };
    var Op = d;
    var Ep = b;
    var Rp = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine'];
    var Bp = function (t, e) {
        Op(uo(t.series), function (t) {
            if (Ep(t)) {
                ho(t);
            }
        });
        var n = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar'];
        if (e) {
            n.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis');
        }
        Op(n, function (e) {
            Op(uo(t[e]), function (t) {
                if (t) {
                    so(t, 'axisLabel');
                    so(t.axisPointer, 'label');
                }
            });
        });
        Op(uo(t.parallel), function (t) {
            var e = t && t.parallelAxisDefault;
            so(e, 'axisLabel');
            so(e && e.axisPointer, 'label');
        });
        Op(uo(t.calendar), function (t) {
            ao(t, 'itemStyle');
            so(t, 'dayLabel');
            so(t, 'monthLabel');
            so(t, 'yearLabel');
        });
        Op(uo(t.radar), function (t) {
            so(t, 'name');
        });
        Op(uo(t.geo), function (t) {
            if (Ep(t)) {
                lo(t);
                Op(uo(t.regions), function (t) {
                    lo(t);
                });
            }
        });
        Op(uo(t.timeline), function (t) {
            lo(t);
            ao(t, 'label');
            ao(t, 'itemStyle');
            ao(t, 'controlStyle', true);
            var e = t.data;
            if (_(e)) {
                d(e, function (t) {
                    if (b(t)) {
                        ao(t, 'label');
                        ao(t, 'itemStyle');
                    }
                });
            }
        });
        Op(uo(t.toolbox), function (t) {
            ao(t, 'iconStyle');
            Op(t.feature, function (t) {
                ao(t, 'iconStyle');
            });
        });
        so(co(t.axisPointer), 'label');
        so(co(t.tooltip).axisPointer, 'label');
    };
    var zp = [
        ['x', 'left'],
        ['y', 'top'],
        ['x2', 'right'],
        ['y2', 'bottom']
    ];
    var Np = ['grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline'];
    var Fp = function (t, e) {
        Bp(t, e);
        t.series = ui(t.series);
        d(t.series, function (t) {
            if (b(t)) {
                var e = t.type;
                if (('pie' === e || 'gauge' === e) && null != t.clockWise) {
                    t.clockwise = t.clockWise;
                }
                if ('gauge' === e) {
                    var n = fo(t, 'pointer.color');
                    if (null != n) {
                        po(t, 'itemStyle.normal.color', n);
                    }
                }
                go(t);
            }
        });
        if (t.dataRange) {
            t.visualMap = t.dataRange;
        }
        d(Np, function (e) {
            var n = t[e];
            if (n) {
                _(n) || (n = [n]);
                d(n, function (t) {
                    go(t);
                });
            }
        });
    };
    var Vp = function (t) {
        var e = z();
        t.eachSeries(function (t) {
            var n = t.get('stack');
            if (n) {
                var i = e.get(n) || e.set(n, []);
                var r = t.getData();
                var a = {
                    stackResultDimension: r.getCalculationInfo('stackResultDimension'),
                    stackedOverDimension: r.getCalculationInfo('stackedOverDimension'),
                    stackedDimension: r.getCalculationInfo('stackedDimension'),
                    stackedByDimension: r.getCalculationInfo('stackedByDimension'),
                    isStackedByIndex: r.getCalculationInfo('isStackedByIndex'),
                    data: r,
                    seriesModel: t
                };
                if (!a.stackedDimension || (!a.isStackedByIndex && !a.stackedByDimension)) {
                    return;
                }
                if (i.length) {
                    r.setCalculationInfo('stackedOnSeries', i[i.length - 1].seriesModel);
                }
                i.push(a);
            }
        });
        e.each(vo);
    };
    var Wp = mo.prototype;
    Wp.pure = false;
    Wp.persistent = true;
    Wp.getSource = function () {
        return this._source;
    };
    var Hp = {
        arrayRows_column: {
            pure: true,
            count: function () {
                return Math.max(0, this._data.length - this._source.startIndex);
            },
            getItem: function (t) {
                return this._data[t + this._source.startIndex];
            },
            appendData: xo
        },
        arrayRows_row: {
            pure: true,
            count: function () {
                var t = this._data[0];
                return t ? Math.max(0, t.length - this._source.startIndex) : 0;
            },
            getItem: function (t) {
                t += this._source.startIndex;
                for (e = [], n = this._data, i = 0, void 0; i < n.length; i++) {
                    var e;
                    var n;
                    var i;
                    var r = n[i];
                    e.push(r ? r[t] : null);
                }
                return e;
            },
            appendData: function () {
                throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
            }
        },
        objectRows: {
            pure: true,
            count: yo,
            getItem: _o,
            appendData: xo
        },
        keyedColumns: {
            pure: true,
            count: function () {
                var t = this._source.dimensionsDefine[0].name;
                var e = this._data[t];
                return e ? e.length : 0;
            },
            getItem: function (t) {
                for (e = [], n = this._source.dimensionsDefine, i = 0, void 0; i < n.length; i++) {
                    var e;
                    var n;
                    var i;
                    var r = this._data[n[i].name];
                    e.push(r ? r[t] : null);
                }
                return e;
            },
            appendData: function (t) {
                var e = this._data;
                d(t, function (t, n) {
                    for (i = e[n] || (e[n] = []), r = 0, void 0; r < (t || []).length; r++) {
                        var i;
                        var r;
                        i.push(t[r]);
                    }
                });
            }
        },
        original: {
            count: yo,
            getItem: _o,
            appendData: xo
        },
        typedArray: {
            persistent: false,
            pure: true,
            count: function () {
                return this._data ? this._data.length / this._dimSize : 0;
            },
            getItem: function (t, e) {
                t -= this._offset;
                e = e || [];
                for (n = this._dimSize * t, i = 0, void 0; i < this._dimSize; i++) {
                    var n;
                    var i;
                    e[i] = this._data[n + i];
                }
                return e;
            },
            appendData: function (t) {
                this._data = t;
            },
            clean: function () {
                this._offset += this.count();
                this._data = null;
            }
        }
    };
    var Gp = {
        arrayRows: wo,
        objectRows: function (t, e, n, i) {
            return null != n ? t[i] : t;
        },
        keyedColumns: wo,
        original: function (t, e, n) {
            var i = fi(t);
            return null != n && i instanceof Array ? i[n] : i;
        },
        typedArray: wo
    };
    var qp = {
        arrayRows: bo,
        objectRows: function (t, e) {
            return Mo(t[e], this._dimensionInfos[e]);
        },
        keyedColumns: bo,
        original: function (t, e, n, i) {
            var r = t && (null == t.value ? t : t.value);
            if (!this._rawData.pure && di(t)) {
                this.hasItemOption = true;
            }
            return Mo(r instanceof Array ? r[i] : r, this._dimensionInfos[e]);
        },
        typedArray: function (t, e, n, i) {
            return t[i];
        }
    };
    var Xp = /\{@(.+?)\}/g;
    var Up = {
        getDataParams: function (t, e) {
            var n = this.getData(e);
            var i = this.getRawValue(t, e);
            var r = n.getRawIndex(t);
            var a = n.getName(t);
            var o = n.getRawDataItem(t);
            var s = n.getItemVisual(t, 'color');
            return {
                componentType: this.mainType,
                componentSubType: this.subType,
                seriesType: 'series' === this.mainType ? this.subType : null,
                seriesIndex: this.seriesIndex,
                seriesId: this.id,
                seriesName: this.name,
                name: a,
                dataIndex: r,
                data: o,
                dataType: e,
                value: i,
                color: s,
                marker: ya(s),
                $vars: ['seriesName', 'name', 'value']
            };
        },
        getFormattedLabel: function (t, e, n, i, r) {
            e = e || 'normal';
            var a = this.getData(n);
            var o = a.getItemModel(t);
            var s = this.getDataParams(t, n);
            if (null != i && s.value instanceof Array) {
                s.value = s.value[i];
            }
            var l = o.get('normal' === e ? [r || 'label', 'formatter'] : [e, r || 'label', 'formatter']);
            if ('function' == typeof l) {
                s.status = e;
                return l(s);
            }
            if ('string' == typeof l) {
                var h = ma(l, s);
                return h.replace(Xp, function (e, n) {
                    var i = n.length;
                    if ('[' === n.charAt(0) && ']' === n.charAt(i - 1)) {
                        n = +n.slice(1, i - 1);
                    }
                    return So(a, t, n);
                });
            }
        },
        getRawValue: function (t, e) {
            return So(this.getData(e), t);
        },
        formatTooltip: function () {}
    };
    var Yp = To.prototype;
    Yp.perform = function (t) {
        function e(t) {
            if (!(t >= 1)) {
                t = 1;
            }
            return t;
        }
        var n = this._upstream;
        var i = t && t.skip;
        if (this._dirty && n) {
            var r = this.context;
            r.data = r.outputData = n.context.outputData;
        }
        if (this.__pipeline) {
            this.__pipeline.currentTask = this;
        }
        var a;
        if (this._plan && !i) {
            a = this._plan(this.context);
        }
        var o = e(this._modBy);
        var s = this._modDataCount || 0;
        var l = e(t && t.modBy);
        var h = (t && t.modDataCount) || 0;
        if (o !== l || s !== h) {
            a = 'reset';
        }
        var u;
        if (this._dirty || 'reset' === a) {
            this._dirty = false;
            u = Do(this, i);
        }
        this._modBy = l;
        this._modDataCount = h;
        var c = t && t.step;
        this._dueEnd = n ? n._outputDueEnd : this._count ? this._count(this.context) : 1 / 0;
        if (this._progress) {
            var f = this._dueIndex;
            var d = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
            if (!i && (u || d > f)) {
                var p = this._progress;
                if (_(p)) {
                    for (var g = 0; g < p.length; g++) {
                        ko(this, p[g], f, d, l, h);
                    }
                } else {
                    ko(this, p, f, d, l, h);
                }
            }
            this._dueIndex = d;
            var v = null != this._settedOutputEnd ? this._settedOutputEnd : d;
            this._outputDueEnd = v;
        } else {
            this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
        }
        return this.unfinished();
    };
    var jp = (function () {
        function t() {
            return n > i ? i++ : null;
        }
        function e() {
            var t = (i % o) * r + Math.ceil(i / o);
            var e = i >= n ? null : a > t ? t : i;
            i++;
            return e;
        }
        var n;
        var i;
        var r;
        var a;
        var o;
        var s = {
            reset: function (l, h, u, c) {
                i = l;
                n = h;
                r = u;
                a = c;
                o = Math.ceil(a / r);
                s.next = r > 1 && a > 0 ? e : t;
            }
        };
        return s;
    })();
    Yp.dirty = function () {
        this._dirty = true;
        if (this._onDirty) {
            this._onDirty(this.context);
        }
    };
    Yp.unfinished = function () {
        return this._progress && this._dueIndex < this._dueEnd;
    };
    Yp.pipe = function (t) {
        if (this._downstream !== t || this._dirty) {
            this._downstream = t;
            t._upstream = this;
            t.dirty();
        }
    };
    Yp.dispose = function () {
        this._disposed ||
            (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), (this._dirty = false), (this._disposed = true));
    };
    Yp.getUpstream = function () {
        return this._upstream;
    };
    Yp.getDownstream = function () {
        return this._downstream;
    };
    Yp.setOutputEnd = function (t) {
        this._outputDueEnd = this._settedOutputEnd = t;
    };
    var Zp = _i();
    var $p = hp.extend({
        type: 'series.__base__',
        seriesIndex: 0,
        coordinateSystem: null,
        defaultOption: null,
        legendDataProvider: null,
        visualColorAccessPath: 'itemStyle.color',
        layoutMode: null,
        init: function (t, e, n) {
            this.seriesIndex = this.componentIndex;
            this.dataTask = Co({
                count: Lo,
                reset: Po
            });
            this.dataTask.context = {
                model: this
            };
            this.mergeDefaultAndTheme(t, n);
            Ea(this);
            var i = this.getInitialData(t, n);
            Eo(i, this);
            this.dataTask.context.data = i;
            Zp(this).dataBeforeProcessed = i;
            Io(this);
        },
        mergeDefaultAndTheme: function (t, e) {
            var n = this.layoutMode;
            var i = n ? Sa(t) : {};
            var a = this.subType;
            if (hp.hasClass(a)) {
                a += 'Series';
            }
            r(t, e.getTheme().get(this.subType));
            r(t, this.getDefaultOption());
            ci(t, 'label', ['show']);
            this.fillDataTextStyle(t.data);
            if (n) {
                Ma(t, i, n);
            }
        },
        mergeOption: function (t, e) {
            t = r(this.option, t, true);
            this.fillDataTextStyle(t.data);
            var n = this.layoutMode;
            if (n) {
                Ma(this.option, t, n);
            }
            Ea(this);
            var i = this.getInitialData(t, e);
            Eo(i, this);
            this.dataTask.dirty();
            this.dataTask.context.data = i;
            Zp(this).dataBeforeProcessed = i;
            Io(this);
        },
        fillDataTextStyle: function (t) {
            if (t && !S(t)) {
                for (e = ['show'], n = 0, void 0; n < t.length; n++) {
                    var e;
                    var n;
                    if (t[n] && t[n].label) {
                        ci(t[n], 'label', e);
                    }
                }
            }
        },
        getInitialData: function () {},
        appendData: function (t) {
            var e = this.getRawData();
            e.appendData(t.data);
        },
        getData: function (t) {
            var e = Bo(this);
            if (e) {
                var n = e.context.data;
                return null == t ? n : n.getLinkedData(t);
            }
            return Zp(this).data;
        },
        setData: function (t) {
            var e = Bo(this);
            if (e) {
                var n = e.context;
                if (n.data !== t && e.modifyOutputEnd) {
                    e.setOutputEnd(t.count());
                }
                n.outputData = t;
                if (e !== this.dataTask) {
                    n.data = t;
                }
            }
            Zp(this).data = t;
        },
        getSource: function () {
            return Pa(this);
        },
        getRawData: function () {
            return Zp(this).dataBeforeProcessed;
        },
        getBaseAxis: function () {
            var t = this.coordinateSystem;
            return t && t.getBaseAxis && t.getBaseAxis();
        },
        formatTooltip: function (t, e) {
            function n(n) {
                function i(t, n) {
                    var i = r.getDimensionInfo(n);
                    if (i && i.otherDims.tooltip !== false) {
                        var a = i.type;
                        var l = ya({
                            color: h,
                            type: 'subItem'
                        });
                        var u = (o ? l + va(i.displayName || '-') + ': ' : '') + va('ordinal' === a ? t + '' : 'time' === a ? (e ? '' : xa('yyyy/MM/dd hh:mm:ss', t)) : ga(t));
                        if (u) {
                            s.push(u);
                        }
                    }
                }
                var o = g(
                    n,
                    function (t, e, n) {
                        var i = r.getDimensionInfo(n);
                        return (t |= i && i.tooltip !== false && null != i.displayName);
                    },
                    0
                );
                var s = [];
                a.length
                    ? d(a, function (e) {
                          i(So(r, t, e), e);
                      })
                    : d(n, i);
                return (o ? '<br/>' : '') + s.join(o ? '<br/>' : ', ');
            }
            function i(t) {
                return va(ga(t));
            }
            var r = this.getData();
            var a = r.mapDimension('defaultedTooltip', true);
            var o = a.length;
            var s = this.getRawValue(t);
            var l = _(s);
            var h = r.getItemVisual(t, 'color');
            if (b(h) && h.colorStops) {
                h = (h.colorStops[0] || {}).color;
            }
            h = h || 'transparent';
            var u = o > 1 || (l && !o) ? n(s) : i(o ? So(r, t, a[0]) : l ? s[0] : s);
            var c = ya(h);
            var f = r.getName(t);
            var p = this.name;
            vi(this) || (p = '');
            p = p ? va(p) + (e ? ': ' : '<br/>') : '';
            return e ? c + p + u : p + c + (f ? va(f) + ': ' + u : u);
        },
        isAnimationEnabled: function () {
            if (bu.node) {
                return false;
            }
            var t = this.getShallow('animation');
            if (t && this.getData().count() > this.getShallow('animationThreshold')) {
                t = false;
            }
            return t;
        },
        restoreData: function () {
            this.dataTask.dirty();
        },
        getColorFromPalette: function (t, e, n) {
            var i = this.ecModel;
            var r = dp.getColorFromPalette.call(this, t, e, n);
            r || (r = i.getColorFromPalette(t, e, n));
            return r;
        },
        coordDimToDataDim: function (t) {
            return this.getRawData().mapDimension(t, true);
        },
        getProgressive: function () {
            return this.get('progressive');
        },
        getProgressiveThreshold: function () {
            return this.get('progressiveThreshold');
        },
        getAxisTooltipData: null,
        getTooltipPosition: null,
        pipeTask: null,
        preventIncremental: null,
        pipelineContext: null
    });
    c($p, Up);
    c($p, dp);
    var Kp = function () {
        this.group = new mc();
        this.uid = ta('viewComponent');
    };
    Kp.prototype = {
        constructor: Kp,
        init: function () {},
        render: function () {},
        dispose: function () {}
    };
    var Qp = Kp.prototype;
    Qp.updateView = Qp.updateLayout = Qp.updateVisual = function () {};
    Ti(Kp);
    Ai(Kp, {
        registerWhenExtend: true
    });
    var Jp = function () {
        var t = _i();
        return function (e) {
            var n = t(e);
            var i = e.pipelineContext;
            var r = n.large;
            var a = n.progressiveRender;
            var o = (n.large = i.large);
            var s = (n.progressiveRender = i.progressiveRender);
            return !!(r ^ o || a ^ s) && 'reset';
        };
    };
    var tg = _i();
    var eg = Jp();
    zo.prototype = {
        type: 'chart',
        init: function () {},
        render: function () {},
        highlight: function (t, e, n, i) {
            Fo(t.getData(), i, 'emphasis');
        },
        downplay: function (t, e, n, i) {
            Fo(t.getData(), i, 'normal');
        },
        remove: function () {
            this.group.removeAll();
        },
        dispose: function () {},
        incrementalPrepareRender: null,
        incrementalRender: null,
        updateTransform: null
    };
    var ng = zo.prototype;
    ng.updateView =
        ng.updateLayout =
        ng.updateVisual =
            function (t, e, n, i) {
                this.render(t, e, n, i);
            };
    Ti(zo, ['dispose']);
    Ai(zo, {
        registerWhenExtend: true
    });
    zo.markUpdateMethod = function (t, e) {
        tg(t).updateMethod = e;
    };
    var ig = {
        incrementalPrepareRender: {
            progress: function (t, e) {
                e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
            }
        },
        render: {
            forceFirstProgress: true,
            progress: function (t, e) {
                e.view.render(e.model, e.ecModel, e.api, e.payload);
            }
        }
    };
    var rg = {
        createOnAllSeries: true,
        performRawSeries: true,
        reset: function (t, e) {
            var n = t.getData();
            var i = (t.visualColorAccessPath || 'itemStyle.color').split('.');
            var r = t.get(i) || t.getColorFromPalette(t.name, null, e.getSeriesCount());
            n.setVisual('color', r);
            if (!e.isSeriesFiltered(t)) {
                'function' != typeof r ||
                    r instanceof zd ||
                    n.each(function (e) {
                        n.setItemVisual(e, 'color', r(t.getDataParams(e)));
                    });
                var a = function (t, e) {
                    var n = t.getItemModel(e);
                    var r = n.get(i, true);
                    if (null != r) {
                        t.setItemVisual(e, 'color', r);
                    }
                };
                return {
                    dataEach: n.hasItemOption ? a : null
                };
            }
        }
    };
    var ag = {
        toolbox: {
            brush: {
                title: {
                    rect: '矩形选择',
                    polygon: '圈选',
                    lineX: '横向选择',
                    lineY: '纵向选择',
                    keep: '保持选择',
                    clear: '清除选择'
                }
            },
            dataView: {
                title: '数据视图',
                lang: ['数据视图', '关闭', '刷新']
            },
            dataZoom: {
                title: {
                    zoom: '区域缩放',
                    back: '区域缩放还原'
                }
            },
            magicType: {
                title: {
                    line: '切换为折线图',
                    bar: '切换为柱状图',
                    stack: '切换为堆叠',
                    tiled: '切换为平铺'
                }
            },
            restore: {
                title: '还原'
            },
            saveAsImage: {
                title: '保存为图片',
                lang: ['右键另存为图片']
            }
        },
        series: {
            typeNames: {
                pie: '饼图',
                bar: '柱状图',
                line: '折线图',
                scatter: '散点图',
                effectScatter: '涟漪散点图',
                radar: '雷达图',
                tree: '树图',
                treemap: '矩形树图',
                boxplot: '箱型图',
                candlestick: 'K线图',
                k: 'K线图',
                heatmap: '热力图',
                map: '地图',
                parallel: '平行坐标图',
                lines: '线图',
                graph: '关系图',
                sankey: '桑基图',
                funnel: '漏斗图',
                gauge: '仪表盘图',
                pictorialBar: '象形柱图',
                themeRiver: '主题河流图',
                sunburst: '旭日图'
            }
        },
        aria: {
            general: {
                withTitle: '这是一个关于“{title}”的图表。',
                withoutTitle: '这是一个图表，'
            },
            series: {
                single: {
                    prefix: '',
                    withName: '图表类型是{seriesType}，表示{seriesName}。',
                    withoutName: '图表类型是{seriesType}。'
                },
                multiple: {
                    prefix: '它由{seriesCount}个图表系列组成。',
                    withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType}，',
                    withoutName: '第{seriesId}个系列是一个{seriesType}，',
                    separator: {
                        middle: '；',
                        end: '。'
                    }
                }
            },
            data: {
                allData: '其数据是——',
                partialData: '其中，前{displayCnt}项是——',
                withName: '{name}的数据是{value}',
                withoutName: '{value}',
                separator: {
                    middle: '，',
                    end: ''
                }
            }
        }
    };
    var og = function (t, e) {
        function n(t, e) {
            if ('string' != typeof t) {
                return t;
            }
            var n = t;
            d(e, function (t, e) {
                n = n.replace(new RegExp('\\{\\s*' + e + '\\s*\\}', 'g'), t);
            });
            return n;
        }
        function i(t) {
            var e = o.get(t);
            if (null == e) {
                for (n = t.split('.'), i = ag.aria, r = 0, void 0; r < n.length; ++r) {
                    var n;
                    var i;
                    var r;
                    i = i[n[r]];
                }
                return i;
            }
            return e;
        }
        function r() {
            var t = e.getModel('title').option;
            if (t && t.length) {
                t = t[0];
            }
            return t && t.text;
        }
        function a(t) {
            return ag.series.typeNames[t] || '自定义图';
        }
        var o = e.getModel('aria');
        if (o.get('show')) {
            if (o.get('description')) {
                return void t.setAttribute('aria-label', o.get('description'));
            }
            var s = 0;
            e.eachSeries(function () {
                ++s;
            }, this);
            var l;
            var h = o.get('data.maxCount') || 10;
            var u = o.get('series.maxCount') || 10;
            var c = Math.min(s, u);
            if (!(1 > s)) {
                var f = r();
                l = f
                    ? n(i('general.withTitle'), {
                          title: f
                      })
                    : i('general.withoutTitle');
                var p = [];
                var g = s > 1 ? 'series.multiple.prefix' : 'series.single.prefix';
                l += n(i(g), {
                    seriesCount: s
                });
                e.eachSeries(function (t, e) {
                    if (c > e) {
                        var r;
                        var o = t.get('name');
                        var l = 'series.' + (s > 1 ? 'multiple' : 'single') + '.';
                        r = i(o ? l + 'withName' : l + 'withoutName');
                        r = n(r, {
                            seriesId: t.seriesIndex,
                            seriesName: t.get('name'),
                            seriesType: a(t.subType)
                        });
                        var u = t.getData();
                        window.data = u;
                        r +=
                            u.count() > h
                                ? n(i('data.partialData'), {
                                      displayCnt: h
                                  })
                                : i('data.allData');
                        for (f = [], d = 0, void 0; d < u.count(); d++) {
                            var f;
                            var d;
                            if (h > d) {
                                var g = u.getName(d);
                                var v = So(u, d);
                                f.push(
                                    n(i(g ? 'data.withName' : 'data.withoutName'), {
                                        name: g,
                                        value: v
                                    })
                                );
                            }
                        }
                        r += f.join(i('data.separator.middle')) + i('data.separator.end');
                        p.push(r);
                    }
                });
                l += p.join(i('series.multiple.separator.middle')) + i('series.multiple.separator.end');
                t.setAttribute('aria-label', l);
            }
        }
    };
    var sg = Math.PI;
    var lg = function (t, e) {
        e = e || {};
        s(e, {
            text: 'loading',
            color: '#c23531',
            textColor: '#000',
            maskColor: 'rgba(255, 255, 255, 0.8)',
            zlevel: 0
        });
        var n = new Od({
            style: {
                fill: e.maskColor
            },
            zlevel: e.zlevel,
            z: 10000
        });
        var i = new Bd({
            shape: {
                startAngle: -sg / 2,
                endAngle: -sg / 2 + 0.1,
                r: 10
            },
            style: {
                stroke: e.color,
                lineCap: 'round',
                lineWidth: 5
            },
            zlevel: e.zlevel,
            z: 10001
        });
        var r = new Od({
            style: {
                fill: 'none',
                text: e.text,
                textPosition: 'right',
                textDistance: 10,
                textFill: e.textColor
            },
            zlevel: e.zlevel,
            z: 10001
        });
        i.animateShape(true)
            .when(1000, {
                endAngle: (3 * sg) / 2
            })
            .start('circularInOut');
        i.animateShape(true)
            .when(1000, {
                startAngle: (3 * sg) / 2
            })
            .delay(300)
            .start('circularInOut');
        var a = new mc();
        a.add(i);
        a.add(r);
        a.add(n);
        a.resize = function () {
            var e = t.getWidth() / 2;
            var a = t.getHeight() / 2;
            i.setShape({
                cx: e,
                cy: a
            });
            var o = i.shape.r;
            r.setShape({
                x: e - o,
                y: a - o,
                width: 2 * o,
                height: 2 * o
            });
            n.setShape({
                x: 0,
                y: 0,
                width: t.getWidth(),
                height: t.getHeight()
            });
        };
        a.resize();
        return a;
    };
    var hg = Go.prototype;
    hg.restoreData = function (t, e) {
        t.restoreData(e);
        this._stageTaskMap.each(function (t) {
            var e = t.overallTask;
            if (e) {
                e.dirty();
            }
        });
    };
    hg.getPerformArgs = function (t, e) {
        if (t.__pipeline) {
            var n = this._pipelineMap.get(t.__pipeline.id);
            var i = n.context;
            var r = !e && n.progressiveEnabled && (!i || i.progressiveRender) && t.__idxInPipeline > n.blockIndex;
            var a = r ? n.step : null;
            var o = i && i.modDataCount;
            var s = null != o ? Math.ceil(o / a) : null;
            return {
                step: a,
                modBy: s,
                modDataCount: o
            };
        }
    };
    hg.getPipeline = function (t) {
        return this._pipelineMap.get(t);
    };
    hg.updateStreamModes = function (t, e) {
        var n = this._pipelineMap.get(t.uid);
        var i = t.getData();
        var r = i.count();
        var a = n.progressiveEnabled && e.incrementalPrepareRender && r >= n.threshold;
        var o = t.get('large') && r >= t.get('largeThreshold');
        var s = 'mod' === t.get('progressiveChunkMode') ? r : null;
        t.pipelineContext = n.context = {
            progressiveRender: a,
            modDataCount: s,
            large: o
        };
    };
    hg.restorePipelines = function (t) {
        var that = this;
        var n = (that._pipelineMap = z());
        t.eachSeries(function (t) {
            var i = t.getProgressive();
            var r = t.uid;
            n.set(r, {
                id: r,
                head: null,
                tail: null,
                threshold: t.getProgressiveThreshold(),
                progressiveEnabled: i && !(t.preventIncremental && t.preventIncremental()),
                blockIndex: -1,
                step: Math.round(i || 700),
                count: 0
            });
            es(that, t, t.dataTask);
        });
    };
    hg.prepareStageTasks = function () {
        var t = this._stageTaskMap;
        var e = this.ecInstance.getModel();
        var n = this.api;
        d(
            this._allHandlers,
            function (i) {
                var r = t.get(i.uid) || t.set(i.uid, []);
                if (i.reset) {
                    Xo(this, i, r, e, n);
                }
                if (i.overallReset) {
                    Uo(this, i, r, e, n);
                }
            },
            this
        );
    };
    hg.prepareView = function (t, e, n, i) {
        var r = t.renderTask;
        var a = r.context;
        a.model = e;
        a.ecModel = n;
        a.api = i;
        r.__block = !t.incrementalPrepareRender;
        es(this, e, r);
    };
    hg.performDataProcessorTasks = function (t, e) {
        qo(this, this._dataProcessorHandlers, t, e, {
            block: true
        });
    };
    hg.performVisualTasks = function (t, e, n) {
        qo(this, this._visualHandlers, t, e, n);
    };
    hg.performSeriesTasks = function (t) {
        var e;
        t.eachSeries(function (t) {
            e |= t.dataTask.perform();
        });
        this.unfinished |= e;
    };
    hg.plan = function () {
        this._pipelineMap.each(function (t) {
            var e = t.tail;
            do {
                if (e.__block) {
                    t.blockIndex = e.__idxInPipeline;
                    break;
                }
                e = e.getUpstream();
            } while (e);
        });
    };
    var ug = (hg.updatePayload = function (t, e) {
        if ('remain' !== e) {
            t.context.payload = e;
        }
    });
    var cg = Jo(0);
    Go.wrapStageHandler = function (t, e) {
        if (x(t)) {
            t = {
                overallReset: t,
                seriesType: ns(t)
            };
        }
        t.uid = ta('stageHandler');
        if (e) {
            t.visualType = e;
        }
        return t;
    };
    var fg;
    var dg = {};
    var pg = {};
    is(dg, Cp);
    is(pg, $a);
    dg.eachSeriesByType = dg.eachRawSeriesByType = function (t) {
        fg = t;
    };
    dg.eachComponent = function (t) {
        if ('series' === t.mainType && t.subType) {
            fg = t.subType;
        }
    };
    var gg = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'];
    var vg = {
        color: gg,
        colorLayer: [
            ['#37A2DA', '#ffd85c', '#fd7b5f'],
            ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'],
            ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'],
            gg
        ]
    };
    var mg = '#eee';
    var yg = function () {
        return {
            axisLine: {
                lineStyle: {
                    color: mg
                }
            },
            axisTick: {
                lineStyle: {
                    color: mg
                }
            },
            axisLabel: {
                textStyle: {
                    color: mg
                }
            },
            splitLine: {
                lineStyle: {
                    type: 'dashed',
                    color: '#aaa'
                }
            },
            splitArea: {
                areaStyle: {
                    color: mg
                }
            }
        };
    };
    var _g = ['#dd6b66', '#759aa0', '#e69d87', '#8dc1a9', '#ea7e53', '#eedd78', '#73a373', '#73b9bc', '#7289ab', '#91ca8c', '#f49f42'];
    var xg = {
        color: _g,
        backgroundColor: '#333',
        tooltip: {
            axisPointer: {
                lineStyle: {
                    color: mg
                },
                crossStyle: {
                    color: mg
                }
            }
        },
        legend: {
            textStyle: {
                color: mg
            }
        },
        textStyle: {
            color: mg
        },
        title: {
            textStyle: {
                color: mg
            }
        },
        toolbox: {
            iconStyle: {
                normal: {
                    borderColor: mg
                }
            }
        },
        dataZoom: {
            textStyle: {
                color: mg
            }
        },
        visualMap: {
            textStyle: {
                color: mg
            }
        },
        timeline: {
            lineStyle: {
                color: mg
            },
            itemStyle: {
                normal: {
                    color: _g[1]
                }
            },
            label: {
                normal: {
                    textStyle: {
                        color: mg
                    }
                }
            },
            controlStyle: {
                normal: {
                    color: mg,
                    borderColor: mg
                }
            }
        },
        timeAxis: yg(),
        logAxis: yg(),
        valueAxis: yg(),
        categoryAxis: yg(),
        line: {
            symbol: 'circle'
        },
        graph: {
            color: _g
        },
        gauge: {
            title: {
                textStyle: {
                    color: mg
                }
            }
        },
        candlestick: {
            itemStyle: {
                normal: {
                    color: '#FD1050',
                    color0: '#0CF49B',
                    borderColor: '#FD1050',
                    borderColor0: '#0CF49B'
                }
            }
        }
    };
    xg.categoryAxis.splitLine.show = false;
    hp.extend({
        type: 'dataset',
        defaultOption: {
            seriesLayoutBy: wp,
            sourceHeader: null,
            dimensions: null,
            source: null
        },
        optionUpdated: function () {
            La(this);
        }
    });
    Kp.extend({
        type: 'dataset'
    });
    var wg = P;
    var bg = d;
    var Mg = x;
    var Sg = b;
    var Cg = hp.parseClassType;
    var Tg = '4.1.0';
    var kg = {
        zrender: '4.0.4'
    };
    var Dg = 1;
    var Ig = 1000;
    var Ag = 5000;
    var Lg = 1000;
    var Pg = 2000;
    var Og = 3000;
    var Eg = 4000;
    var Rg = 5000;
    var Bg = {
        PROCESSOR: {
            FILTER: Ig,
            STATISTIC: Ag
        },
        VISUAL: {
            LAYOUT: Lg,
            GLOBAL: Pg,
            CHART: Og,
            COMPONENT: Eg,
            BRUSH: Rg
        }
    };
    var zg = '__flagInMainProcess';
    var Ng = '__optionUpdated';
    var Fg = /^[a-zA-Z0-9_]+$/;
    as.prototype.on = rs('on');
    as.prototype.off = rs('off');
    as.prototype.one = rs('one');
    c(as, Vu);
    var Vg = os.prototype;
    Vg._onframe = function () {
        if (!this._disposed) {
            var t = this._scheduler;
            if (this[Ng]) {
                var e = this[Ng].silent;
                this[zg] = true;
                ls(this);
                Wg.update.call(this);
                this[zg] = false;
                this[Ng] = false;
                fs.call(this, e);
                ds.call(this, e);
            } else if (t.unfinished) {
                var n = Dg;
                var i = this._model;
                var r = this._api;
                t.unfinished = false;
                do {
                    var a = +new Date();
                    t.performSeriesTasks(i);
                    t.performDataProcessorTasks(i);
                    us(this, i);
                    t.performVisualTasks(i);
                    _s(this, this._model, r, 'remain');
                    n -= +new Date() - a;
                } while (n > 0 && t.unfinished);
                t.unfinished || this._zr.flush();
            }
        }
    };
    Vg.getDom = function () {
        return this._dom;
    };
    Vg.getZr = function () {
        return this._zr;
    };
    Vg.setOption = function (t, e, n) {
        var i;
        if (Sg(e)) {
            n = e.lazyUpdate;
            i = e.silent;
            e = e.notMerge;
        }
        this[zg] = true;
        if (!this._model || e) {
            var r = new Qa(this._api);
            var a = this._theme;
            var o = (this._model = new Cp(null, null, a, r));
            o.scheduler = this._scheduler;
            o.init(null, null, a, r);
        }
        this._model.setOption(t, Ug);
        n
            ? ((this[Ng] = {
                  silent: i
              }),
              (this[zg] = false))
            : (ls(this), Wg.update.call(this), this._zr.flush(), (this[Ng] = false), (this[zg] = false), fs.call(this, i), ds.call(this, i));
    };
    Vg.setTheme = function () {
        console.log('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
    };
    Vg.getModel = function () {
        return this._model;
    };
    Vg.getOption = function () {
        return this._model && this._model.getOption();
    };
    Vg.getWidth = function () {
        return this._zr.getWidth();
    };
    Vg.getHeight = function () {
        return this._zr.getHeight();
    };
    Vg.getDevicePixelRatio = function () {
        return this._zr.painter.dpr || window.devicePixelRatio || 1;
    };
    Vg.getRenderedCanvas = function (t) {
        if (bu.canvasSupported) {
            t = t || {};
            t.pixelRatio = t.pixelRatio || 1;
            t.backgroundColor = t.backgroundColor || this._model.get('backgroundColor');
            var e = this._zr;
            return e.painter.getRenderedCanvas(t);
        }
    };
    Vg.getSvgDataUrl = function () {
        if (bu.svgSupported) {
            var t = this._zr;
            var e = t.storage.getDisplayList();
            d(e, function (t) {
                t.stopAnimation(true);
            });
            return t.painter.pathToDataUrl();
        }
    };
    Vg.getDataURL = function (t) {
        t = t || {};
        var e = t.excludeComponents;
        var n = this._model;
        var i = [];
        var that = this;
        bg(e, function (t) {
            n.eachComponent(
                {
                    mainType: t
                },
                function (t) {
                    var e = that._componentsMap[t.__viewId];
                    e.group.ignore || (i.push(e), (e.group.ignore = true));
                }
            );
        });
        var a = 'svg' === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL('image/' + ((t && t.type) || 'png'));
        bg(i, function (t) {
            t.group.ignore = false;
        });
        return a;
    };
    Vg.getConnectedDataURL = function (t) {
        if (bu.canvasSupported) {
            var e = this.group;
            var n = Math.min;
            var r = Math.max;
            var a = 1 / 0;
            if (Qg[e]) {
                var o = a;
                var s = a;
                var l = -a;
                var h = -a;
                var u = [];
                var c = (t && t.pixelRatio) || 1;
                d(Kg, function (a) {
                    if (a.group === e) {
                        var c = a.getRenderedCanvas(i(t));
                        var f = a.getDom().getBoundingClientRect();
                        o = n(f.left, o);
                        s = n(f.top, s);
                        l = r(f.right, l);
                        h = r(f.bottom, h);
                        u.push({
                            dom: c,
                            left: f.left,
                            top: f.top
                        });
                    }
                });
                o *= c;
                s *= c;
                l *= c;
                h *= c;
                var f = l - o;
                var p = h - s;
                var g = Ou();
                g.width = f;
                g.height = p;
                var v = hi(g);
                bg(u, function (t) {
                    var e = new Hn({
                        style: {
                            x: t.left * c - o,
                            y: t.top * c - s,
                            image: t.dom
                        }
                    });
                    v.add(e);
                });
                v.refreshImmediately();
                return g.toDataURL('image/' + ((t && t.type) || 'png'));
            }
            return this.getDataURL(t);
        }
    };
    Vg.convertToPixel = y(ss, 'convertToPixel');
    Vg.convertFromPixel = y(ss, 'convertFromPixel');
    Vg.containPixel = function (t, e) {
        var n;
        var i = this._model;
        t = xi(i, t);
        d(
            t,
            function (t, i) {
                if (i.indexOf('Models') >= 0) {
                    d(
                        t,
                        function (t) {
                            var r = t.coordinateSystem;
                            if (r && r.containPoint) n |= !!r.containPoint(e);
                            else if ('seriesModels' === i) {
                                var a = this._chartsMap[t.__viewId];
                                if (a && a.containPoint) {
                                    n |= a.containPoint(e, t);
                                }
                            }
                        },
                        this
                    );
                }
            },
            this
        );
        return !!n;
    };
    Vg.getVisual = function (t, e) {
        var n = this._model;
        t = xi(n, t, {
            defaultMainType: 'series'
        });
        var i = t.seriesModel;
        var r = i.getData();
        var a = t.hasOwnProperty('dataIndexInside') ? t.dataIndexInside : t.hasOwnProperty('dataIndex') ? r.indexOfRawIndex(t.dataIndex) : null;
        return null != a ? r.getItemVisual(a, e) : r.getVisual(e);
    };
    Vg.getViewOfComponentModel = function (t) {
        return this._componentsMap[t.__viewId];
    };
    Vg.getViewOfSeriesModel = function (t) {
        return this._chartsMap[t.__viewId];
    };
    var Wg = {
        prepareAndUpdate: function (t) {
            ls(this);
            Wg.update.call(this, t);
        },
        update: function (t) {
            var e = this._model;
            var n = this._api;
            var i = this._zr;
            var r = this._coordSysMgr;
            var a = this._scheduler;
            if (e) {
                a.restoreData(e, t);
                a.performSeriesTasks(e);
                r.create(e, n);
                a.performDataProcessorTasks(e, t);
                us(this, e);
                r.update(e, n);
                vs(e);
                a.performVisualTasks(e, t);
                ms(this, e, n, t);
                var o = e.get('backgroundColor') || 'transparent';
                if (bu.canvasSupported) {
                    i.setBackgroundColor(o);
                } else {
                    var s = Me(o);
                    o = Te(s, 'rgb');
                    if (0 === s[3]) {
                        o = 'transparent';
                    }
                }
                xs(e, n);
            }
        },
        updateTransform: function (t) {
            var e = this._model;
            var that = this;
            var i = this._api;
            if (e) {
                var r = [];
                e.eachComponent(function (a, o) {
                    var s = that.getViewOfComponentModel(o);
                    if (s && s.__alive) {
                        if (s.updateTransform) {
                            var l = s.updateTransform(o, e, i, t);
                            if (l && l.update) {
                                r.push(s);
                            }
                        } else {
                            r.push(s);
                        }
                    }
                });
                var a = z();
                e.eachSeries(function (r) {
                    var o = that._chartsMap[r.__viewId];
                    if (o.updateTransform) {
                        var s = o.updateTransform(r, e, i, t);
                        if (s && s.update) {
                            a.set(r.uid, 1);
                        }
                    } else {
                        a.set(r.uid, 1);
                    }
                });
                vs(e);
                this._scheduler.performVisualTasks(e, t, {
                    setDirty: true,
                    dirtyMap: a
                });
                _s(that, e, i, t, a);
                xs(e, this._api);
            }
        },
        updateView: function (t) {
            var e = this._model;
            if (e) {
                zo.markUpdateMethod(t, 'updateView');
                vs(e);
                this._scheduler.performVisualTasks(e, t, {
                    setDirty: true
                });
                ms(this, this._model, this._api, t);
                xs(e, this._api);
            }
        },
        updateVisual: function (t) {
            Wg.update.call(this, t);
        },
        updateLayout: function (t) {
            Wg.update.call(this, t);
        }
    };
    Vg.resize = function (t) {
        this._zr.resize(t);
        var e = this._model;
        if (this._loadingFX) {
            this._loadingFX.resize();
        }
        if (e) {
            var n = e.resetOption('media');
            var i = t && t.silent;
            this[zg] = true;
            if (n) {
                ls(this);
            }
            Wg.update.call(this);
            this[zg] = false;
            fs.call(this, i);
            ds.call(this, i);
        }
    };
    Vg.showLoading = function (t, e) {
        if (Sg(t)) {
            e = t;
            t = '';
        }
        t = t || 'default';
        this.hideLoading();
        if ($g[t]) {
            var n = $g[t](this._api, e);
            var i = this._zr;
            this._loadingFX = n;
            i.add(n);
        }
    };
    Vg.hideLoading = function () {
        if (this._loadingFX) {
            this._zr.remove(this._loadingFX);
        }
        this._loadingFX = null;
    };
    Vg.makeActionFromEvent = function (t) {
        var e = o({}, t);
        e.type = qg[t.type];
        return e;
    };
    Vg.dispatchAction = function (t, e) {
        Sg(e) ||
            (e = {
                silent: !!e
            });
        if (Gg[t.type] && this._model) {
            if (this[zg]) {
                return void this._pendingActions.push(t);
            }
            cs.call(this, t, e.silent);
            e.flush ? this._zr.flush(true) : e.flush !== false && bu.browser.weChat && this._throttledZrFlush();
            fs.call(this, e.silent);
            ds.call(this, e.silent);
        }
    };
    Vg.appendData = function (t) {
        var e = t.seriesIndex;
        var n = this.getModel();
        var i = n.getSeriesByIndex(e);
        i.appendData(t);
        this._scheduler.unfinished = true;
    };
    Vg.on = rs('on');
    Vg.off = rs('off');
    Vg.one = rs('one');
    var Hg = ['click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];
    Vg._initEvents = function () {
        bg(
            Hg,
            function (t) {
                this._zr.on(
                    t,
                    function (e) {
                        var n;
                        var i = this.getModel();
                        var r = e.target;
                        if ('globalout' === t) n = {};
                        else if (r && null != r.dataIndex) {
                            var a = r.dataModel || i.getSeriesByIndex(r.seriesIndex);
                            n = (a && a.getDataParams(r.dataIndex, r.dataType)) || {};
                        } else {
                            if (r && r.eventData) {
                                n = o({}, r.eventData);
                            }
                        }
                        if (n) {
                            n.event = e;
                            n.type = t;
                            this.trigger(t, n);
                        }
                    },
                    this
                );
            },
            this
        );
        bg(
            qg,
            function (t, e) {
                this._messageCenter.on(
                    e,
                    function (t) {
                        this.trigger(e, t);
                    },
                    this
                );
            },
            this
        );
    };
    Vg.isDisposed = function () {
        return this._disposed;
    };
    Vg.clear = function () {
        this.setOption(
            {
                series: []
            },
            true
        );
    };
    Vg.dispose = function () {
        if (!this._disposed) {
            this._disposed = true;
            bi(this.getDom(), ev, '');
            var t = this._api;
            var e = this._model;
            bg(this._componentsViews, function (n) {
                n.dispose(e, t);
            });
            bg(this._chartsViews, function (n) {
                n.dispose(e, t);
            });
            this._zr.dispose();
            delete Kg[this.id];
        }
    };
    c(os, Vu);
    var Gg = {};
    var qg = {};
    var Xg = [];
    var Ug = [];
    var Yg = [];
    var jg = [];
    var Zg = {};
    var $g = {};
    var Kg = {};
    var Qg = {};
    var Jg = new Date() - 0;
    var tv = new Date() - 0;
    var ev = '_echarts_instance_';
    var nv = {};
    var iv = Ds;
    Vs(Pg, rg);
    Os(Fp);
    Es(Ag, Vp);
    Hs('default', lg);
    Bs(
        {
            type: 'highlight',
            event: 'highlight',
            update: 'highlight'
        },
        N
    );
    Bs(
        {
            type: 'downplay',
            event: 'downplay',
            update: 'downplay'
        },
        N
    );
    Ps('light', vg);
    Ps('dark', xg);
    var rv = {};
    Ks.prototype = {
        constructor: Ks,
        add: function (t) {
            this._add = t;
            return this;
        },
        update: function (t) {
            this._update = t;
            return this;
        },
        remove: function (t) {
            this._remove = t;
            return this;
        },
        execute: function () {
            var t;
            var e = this._old;
            var n = this._new;
            var i = {};
            var r = {};
            var a = [];
            var o = [];
            for (Qs(e, i, a, '_oldKeyGetter', this), Qs(n, r, o, '_newKeyGetter', this), t = 0; t < e.length; t++) {
                var s = a[t];
                var l = r[s];
                if (null != l) {
                    var h = l.length;
                    h ? (1 === h && (r[s] = null), (l = l.unshift())) : (r[s] = null);
                    if (this._update) {
                        this._update(l, t);
                    }
                } else {
                    if (this._remove) {
                        this._remove(t);
                    }
                }
            }
            for (var t = 0; t < o.length; t++) {
                var s = o[t];
                if (r.hasOwnProperty(s)) {
                    var l = r[s];
                    if (null == l) {
                        continue;
                    }
                    if (l.length) {
                        for (u = 0, h = l.length, void 0; h > u; u++) {
                            var u;
                            var h;
                            if (this._add) {
                                this._add(l[u]);
                            }
                        }
                    } else {
                        if (this._add) {
                            this._add(l);
                        }
                    }
                }
            }
        }
    };
    var av = z(['tooltip', 'label', 'itemName', 'itemId', 'seriesName']);
    var ov = b;
    var sv = 'undefined';
    var lv = 'e\0\0';
    var hv = {
        float: typeof Float64Array === sv ? Array : Float64Array,
        int: typeof Int32Array === sv ? Array : Int32Array,
        ordinal: Array,
        number: Array,
        time: Array
    };
    var uv = typeof Uint32Array === sv ? Array : Uint32Array;
    var cv = typeof Uint16Array === sv ? Array : Uint16Array;
    var fv = [
        'hasItemOption',
        '_nameList',
        '_idList',
        '_invertedIndicesMap',
        '_rawData',
        '_chunkSize',
        '_chunkCount',
        '_dimValueGetter',
        '_count',
        '_rawCount',
        '_nameDimIdx',
        '_idDimIdx'
    ];
    var dv = ['_extent', '_approximateExtent', '_rawExtent'];
    var pv = function (t, e) {
        t = t || ['x', 'y'];
        for (n = {}, i = [], r = {}, a = 0, void 0; a < t.length; a++) {
            var n;
            var i;
            var r;
            var a;
            var o = t[a];
            if (w(o)) {
                o = {
                    name: o
                };
            }
            var s = o.name;
            o.type = o.type || 'float';
            o.coordDim || ((o.coordDim = s), (o.coordDimIndex = 0));
            o.otherDims = o.otherDims || {};
            i.push(s);
            n[s] = o;
            o.index = a;
            if (o.createInvertedIndices) {
                r[s] = [];
            }
        }
        this.dimensions = i;
        this._dimensionInfos = n;
        this.hostModel = e;
        this.dataType;
        this._indices = null;
        this._count = 0;
        this._rawCount = 0;
        this._storage = {};
        this._nameList = [];
        this._idList = [];
        this._optionModels = [];
        this._visual = {};
        this._layout = {};
        this._itemVisuals = [];
        this.hasItemVisual = {};
        this._itemLayouts = [];
        this._graphicEls = [];
        this._chunkSize = 100000;
        this._chunkCount = 0;
        this._rawData;
        this._rawExtent = {};
        this._extent = {};
        this._approximateExtent = {};
        this._dimensionsSummary = Js(this);
        this._invertedIndicesMap = r;
        this._calculationInfo = {};
    };
    var gv = pv.prototype;
    gv.type = 'list';
    gv.hasItemOption = true;
    gv.getDimension = function (t) {
        isNaN(t) || (t = this.dimensions[t] || t);
        return t;
    };
    gv.getDimensionInfo = function (t) {
        return this._dimensionInfos[this.getDimension(t)];
    };
    gv.getDimensionsOnCoord = function () {
        return this._dimensionsSummary.dataDimsOnCoord.slice();
    };
    gv.mapDimension = function (t, e) {
        var n = this._dimensionsSummary;
        if (null == e) {
            return n.encodeFirstDimNotExtra[t];
        }
        var i = n.encode[t];
        return e === true ? (i || []).slice() : i && i[e];
    };
    gv.initData = function (t, e, n) {
        var i = Aa.isInstance(t) || f(t);
        if (i) {
            t = new mo(t, this.dimensions.length);
        }
        this._rawData = t;
        this._storage = {};
        this._indices = null;
        this._nameList = e || [];
        this._idList = [];
        this._nameRepeatCount = {};
        n || (this.hasItemOption = false);
        this.defaultDimValueGetter = qp[this._rawData.getSource().sourceFormat];
        this._dimValueGetter = n = n || this.defaultDimValueGetter;
        this._rawExtent = {};
        this._initDataFromProvider(0, t.count());
        if (t.pure) {
            this.hasItemOption = false;
        }
    };
    gv.getProvider = function () {
        return this._rawData;
    };
    gv.appendData = function (t) {
        var e = this._rawData;
        var n = this.count();
        e.appendData(t);
        var i = e.count();
        e.persistent || (i += n);
        this._initDataFromProvider(n, i);
    };
    gv._initDataFromProvider = function (t, e) {
        if (!(t >= e)) {
            for (
                i = this._chunkSize,
                    r = this._rawData,
                    a = this._storage,
                    o = this.dimensions,
                    s = o.length,
                    l = this._dimensionInfos,
                    h = this._nameList,
                    u = this._idList,
                    c = this._rawExtent,
                    f = this._nameRepeatCount = {},
                    d = this._chunkCount,
                    p = d - 1,
                    g = 0,
                    void 0;
                s > g;
                g++
            ) {
                var n;
                var i;
                var r;
                var a;
                var o;
                var s;
                var l;
                var h;
                var u;
                var c;
                var f;
                var d;
                var p;
                var g;
                var v = o[g];
                c[v] || (c[v] = dl());
                var m = l[v];
                if (0 === m.otherDims.itemName) {
                    n = this._nameDimIdx = g;
                }
                if (0 === m.otherDims.itemId) {
                    this._idDimIdx = g;
                }
                var y = hv[m.type];
                a[v] || (a[v] = []);
                var _ = a[v][p];
                if (_ && _.length < i) {
                    for (x = new y(Math.min(e - p * i, i)), w = 0, void 0; w < _.length; w++) {
                        var x;
                        var w;
                        x[w] = _[w];
                    }
                    a[v][p] = x;
                }
                for (var b = d * i; e > b; b += i) {
                    a[v].push(new y(Math.min(e - b, i)));
                }
                this._chunkCount = a[v].length;
            }
            for (M = new Array(s), S = t, void 0; e > S; S++) {
                var M;
                var S;
                M = r.getItem(S, M);
                for (C = Math.floor(S / i), T = S % i, b = 0, void 0; s > b; b++) {
                    var C;
                    var T;
                    var b;
                    var v = o[b];
                    var k = a[v][C];
                    var D = this._dimValueGetter(M, v, S, b);
                    k[T] = D;
                    var I = c[v];
                    if (D < I[0]) {
                        I[0] = D;
                    }
                    if (D > I[1]) {
                        I[1] = D;
                    }
                }
                if (!r.pure) {
                    var A = h[S];
                    if (M && null == A) {
                        if (null != M.name) h[S] = A = M.name;
                        else if (null != n) {
                            var L = o[n];
                            var P = a[L][C];
                            if (P) {
                                A = P[T];
                                var O = l[L].ordinalMeta;
                                if (O && O.categories.length) {
                                    A = O.categories[A];
                                }
                            }
                        }
                    }
                    var E = null == M ? null : M.id;
                    if (null == E && null != A) {
                        f[A] = f[A] || 0;
                        E = A;
                        if (f[A] > 0) {
                            E += '__ec__' + f[A];
                        }
                        f[A]++;
                    }
                    if (null != E) {
                        u[S] = E;
                    }
                }
            }
            if (!r.persistent && r.clean) {
                r.clean();
            }
            this._rawCount = this._count = e;
            this._extent = {};
            al(this);
        }
    };
    gv.count = function () {
        return this._count;
    };
    gv.getIndices = function () {
        var t;
        var e = this._indices;
        if (e) {
            var n = e.constructor;
            var i = this._count;
            if (n === Array) {
                t = new n(i);
                for (var r = 0; i > r; r++) {
                    t[r] = e[r];
                }
            } else {
                t = new n(e.buffer, 0, i);
            }
        } else {
            for (n = nl(this), t = new n(this.count()), r = 0, void 0; r < t.length; r++) {
                var n;
                var t;
                var r;
                t[r] = r;
            }
        }
        return t;
    };
    gv.get = function (t, e) {
        if (!(e >= 0 && e < this._count)) {
            return 0 / 0;
        }
        var n = this._storage;
        if (!n[t]) {
            return 0 / 0;
        }
        e = this.getRawIndex(e);
        var i = Math.floor(e / this._chunkSize);
        var r = e % this._chunkSize;
        var a = n[t][i];
        var o = a[r];
        return o;
    };
    gv.getByRawIndex = function (t, e) {
        if (!(e >= 0 && e < this._rawCount)) {
            return 0 / 0;
        }
        var n = this._storage[t];
        if (!n) {
            return 0 / 0;
        }
        var i = Math.floor(e / this._chunkSize);
        var r = e % this._chunkSize;
        var a = n[i];
        return a[r];
    };
    gv._getFast = function (t, e) {
        var n = Math.floor(e / this._chunkSize);
        var i = e % this._chunkSize;
        var r = this._storage[t][n];
        return r[i];
    };
    gv.getValues = function (t, e) {
        var n = [];
        _(t) || ((e = t), (t = this.dimensions));
        for (i = 0, r = t.length, void 0; r > i; i++) {
            var i;
            var r;
            n.push(this.get(t[i], e));
        }
        return n;
    };
    gv.hasValue = function (t) {
        for (e = this._dimensionsSummary.dataDimsOnCoord, n = this._dimensionInfos, i = 0, r = e.length, void 0; r > i; i++) {
            var e;
            var n;
            var i;
            var r;
            if ('ordinal' !== n[e[i]].type && isNaN(this.get(e[i], t))) {
                return false;
            }
        }
        return true;
    };
    gv.getDataExtent = function (t) {
        t = this.getDimension(t);
        var e = this._storage[t];
        var n = dl();
        if (!e) {
            return n;
        }
        var i;
        var r = this.count();
        var a = !this._indices;
        if (a) {
            return this._rawExtent[t].slice();
        }
        if ((i = this._extent[t])) {
            return i.slice();
        }
        i = n;
        for (o = i[0], s = i[1], l = 0, void 0; r > l; l++) {
            var o;
            var s;
            var l;
            var h = this._getFast(t, this.getRawIndex(l));
            if (o > h) {
                o = h;
            }
            if (h > s) {
                s = h;
            }
        }
        i = [o, s];
        this._extent[t] = i;
        return i;
    };
    gv.getApproximateExtent = function (t) {
        t = this.getDimension(t);
        return this._approximateExtent[t] || this.getDataExtent(t);
    };
    gv.setApproximateExtent = function (t, e) {
        e = this.getDimension(e);
        this._approximateExtent[e] = t.slice();
    };
    gv.getCalculationInfo = function (t) {
        return this._calculationInfo[t];
    };
    gv.setCalculationInfo = function (t, e) {
        ov(t) ? o(this._calculationInfo, t) : (this._calculationInfo[t] = e);
    };
    gv.getSum = function (t) {
        var e = this._storage[t];
        var n = 0;
        if (e) {
            for (i = 0, r = this.count(), void 0; r > i; i++) {
                var i;
                var r;
                var a = this.get(t, i);
                isNaN(a) || (n += a);
            }
        }
        return n;
    };
    gv.getMedian = function (t) {
        var e = [];
        this.each(t, function (t) {
            isNaN(t) || e.push(t);
        });
        var n = [].concat(e).sort(function (t, e) {
            return t - e;
        });
        var i = this.count();
        return 0 === i ? 0 : i % 2 === 1 ? n[(i - 1) / 2] : (n[i / 2] + n[i / 2 - 1]) / 2;
    };
    gv.rawIndexOf = function (t, e) {
        var n = t && this._invertedIndicesMap[t];
        var i = n[e];
        return null == i || isNaN(i) ? -1 : i;
    };
    gv.indexOfName = function (t) {
        for (e = 0, n = this.count(), void 0; n > e; e++) {
            var e;
            var n;
            if (this.getName(e) === t) {
                return e;
            }
        }
        return -1;
    };
    gv.indexOfRawIndex = function (t) {
        if (!this._indices) {
            return t;
        }
        if (t >= this._rawCount || 0 > t) {
            return -1;
        }
        var e = this._indices;
        var n = e[t];
        if (null != n && n < this._count && n === t) {
            return t;
        }
        for (i = 0, r = this._count - 1, void 0; r >= i; ) {
            var i;
            var r;
            var a = ((i + r) / 2) | 0;
            if (e[a] < t) {
                i = a + 1;
            } else {
                if (!(e[a] > t)) {
                    return a;
                }
                r = a - 1;
            }
        }
        return -1;
    };
    gv.indicesOfNearest = function (t, e, n) {
        var i = this._storage;
        var r = i[t];
        var a = [];
        if (!r) {
            return a;
        }
        if (null == n) {
            n = 1 / 0;
        }
        for (o = Number.MAX_VALUE, s = -1, l = 0, h = this.count(), void 0; h > l; l++) {
            var o;
            var s;
            var l;
            var h;
            var u = e - this.get(t, l);
            var c = Math.abs(u);
            if (n >= u && o >= c) {
                if (o > c || (u >= 0 && 0 > s)) {
                    (o = c), (s = u), (a.length = 0);
                }
                a.push(l);
            }
        }
        return a;
    };
    gv.getRawIndex = sl;
    gv.getRawDataItem = function (t) {
        if (this._rawData.persistent) {
            return this._rawData.getItem(this.getRawIndex(t));
        }
        for (e = [], n = 0, void 0; n < this.dimensions.length; n++) {
            var e;
            var n;
            var i = this.dimensions[n];
            e.push(this.get(i, t));
        }
        return e;
    };
    gv.getName = function (t) {
        var e = this.getRawIndex(t);
        return this._nameList[e] || ol(this, this._nameDimIdx, e) || '';
    };
    gv.getId = function (t) {
        return hl(this, this.getRawIndex(t));
    };
    gv.each = function (t, e, n, i) {
        if (this._count) {
            if ('function' == typeof t) {
                i = n;
                n = e;
                e = t;
                t = [];
            }
            n = n || i || this;
            t = p(ul(t), this.getDimension, this);
            for (r = t.length, a = 0, void 0; a < this.count(); a++) {
                var r;
                var a;
                switch (r) {
                    case 0:
                        e.call(n, a);
                        break;
                    case 1:
                        e.call(n, this.get(t[0], a), a);
                        break;
                    case 2:
                        e.call(n, this.get(t[0], a), this.get(t[1], a), a);
                        break;
                    default:
                        for (o = 0, s = [], void 0; r > o; o++) {
                            var o;
                            var s;
                            s[o] = this.get(t[o], a);
                        }
                        s[o] = a;
                        e.apply(n, s);
                }
            }
        }
    };
    gv.filterSelf = function (t, e, n, i) {
        if (this._count) {
            if ('function' == typeof t) {
                i = n;
                n = e;
                e = t;
                t = [];
            }
            n = n || i || this;
            t = p(ul(t), this.getDimension, this);
            for (r = this.count(), a = nl(this), o = new a(r), s = [], l = t.length, h = 0, u = t[0], c = 0, void 0; r > c; c++) {
                var r;
                var a;
                var o;
                var s;
                var l;
                var h;
                var u;
                var c;
                var f;
                var d = this.getRawIndex(c);
                if (0 === l) f = e.call(n, c);
                else if (1 === l) {
                    var g = this._getFast(u, d);
                    f = e.call(n, g, c);
                } else {
                    for (var v = 0; l > v; v++) {
                        s[v] = this._getFast(u, d);
                    }
                    s[v] = c;
                    f = e.apply(n, s);
                }
                if (f) {
                    o[h++] = d;
                }
            }
            if (r > h) {
                this._indices = o;
            }
            this._count = h;
            this._extent = {};
            this.getRawIndex = this._indices ? ll : sl;
            return this;
        }
    };
    gv.selectRange = function (t) {
        if (this._count) {
            var e = [];
            for (var n in t) {
                if (t.hasOwnProperty(n)) {
                    e.push(n);
                }
            }
            var i = e.length;
            if (i) {
                var r = this.count();
                var a = nl(this);
                var o = new a(r);
                var s = 0;
                var l = e[0];
                var h = t[l][0];
                var u = t[l][1];
                var c = false;
                if (!this._indices) {
                    var f = 0;
                    if (1 === i) {
                        for (d = this._storage[e[0]], p = 0, void 0; p < this._chunkCount; p++) {
                            var d;
                            var p;
                            for (g = d[p], v = Math.min(this._count - p * this._chunkSize, this._chunkSize), m = 0, void 0; v > m; m++) {
                                var g;
                                var v;
                                var m;
                                var y = g[m];
                                if ((y >= h && u >= y) || isNaN(y)) {
                                    o[s++] = f;
                                }
                                f++;
                            }
                        }
                        c = true;
                    } else if (2 === i) {
                        for (d = this._storage[l], _ = this._storage[e[1]], x = t[e[1]][0], w = t[e[1]][1], p = 0, void 0; p < this._chunkCount; p++) {
                            var d;
                            var _;
                            var x;
                            var w;
                            var p;
                            for (g = d[p], b = _[p], v = Math.min(this._count - p * this._chunkSize, this._chunkSize), m = 0, void 0; v > m; m++) {
                                var g;
                                var b;
                                var v;
                                var m;
                                var y = g[m];
                                var M = b[m];
                                if (((y >= h && u >= y) || isNaN(y)) && ((M >= x && w >= M) || isNaN(M))) {
                                    o[s++] = f;
                                }
                                f++;
                            }
                        }
                        c = true;
                    }
                }
                if (!c) {
                    if (1 === i) {
                        for (var m = 0; r > m; m++) {
                            var S = this.getRawIndex(m);
                            var y = this._getFast(l, S);
                            if ((y >= h && u >= y) || isNaN(y)) {
                                o[s++] = S;
                            }
                        }
                    } else {
                        for (var m = 0; r > m; m++) {
                            for (C = true, S = this.getRawIndex(m), p = 0, void 0; i > p; p++) {
                                var C;
                                var S;
                                var p;
                                var T = e[p];
                                var y = this._getFast(n, S);
                                if (y < t[T][0] || y > t[T][1]) {
                                    C = false;
                                }
                            }
                            if (C) {
                                o[s++] = this.getRawIndex(m);
                            }
                        }
                    }
                }
                if (r > s) {
                    this._indices = o;
                }
                this._count = s;
                this._extent = {};
                this.getRawIndex = this._indices ? ll : sl;
                return this;
            }
        }
    };
    gv.mapArray = function (t, e, n, i) {
        if ('function' == typeof t) {
            i = n;
            n = e;
            e = t;
            t = [];
        }
        n = n || i || this;
        var r = [];
        this.each(
            t,
            function () {
                r.push(e && e.apply(this, arguments));
            },
            n
        );
        return r;
    };
    gv.map = function (t, e, n, i) {
        n = n || i || this;
        t = p(ul(t), this.getDimension, this);
        var r = cl(this, t);
        r._indices = this._indices;
        r.getRawIndex = r._indices ? ll : sl;
        for (a = r._storage, o = [], s = this._chunkSize, l = t.length, h = this.count(), u = [], c = r._rawExtent, f = 0, void 0; h > f; f++) {
            var a;
            var o;
            var s;
            var l;
            var h;
            var u;
            var c;
            var f;
            for (var d = 0; l > d; d++) {
                u[d] = this.get(t[d], f);
            }
            u[l] = f;
            var g = e && e.apply(n, u);
            if (null != g) {
                if ('object' != typeof g) {
                    o[0] = g;
                    g = o;
                }
                for (v = this.getRawIndex(f), m = Math.floor(v / s), y = v % s, _ = 0, void 0; _ < g.length; _++) {
                    var v;
                    var m;
                    var y;
                    var _;
                    var x = t[_];
                    var w = g[_];
                    var b = c[x];
                    var M = a[x];
                    if (M) {
                        M[m][y] = w;
                    }
                    if (w < b[0]) {
                        b[0] = w;
                    }
                    if (w > b[1]) {
                        b[1] = w;
                    }
                }
            }
        }
        return r;
    };
    gv.downSample = function (t, e, n, i) {
        for (
            r = cl(this, [t]),
                a = r._storage,
                o = [],
                s = Math.floor(1 / e),
                l = a[t],
                h = this.count(),
                u = this._chunkSize,
                c = r._rawExtent[t],
                f = new (nl(this))(h),
                d = 0,
                p = 0,
                void 0;
            h > p;
            p += s
        ) {
            var r;
            var a;
            var o;
            var s;
            var l;
            var h;
            var u;
            var c;
            var f;
            var d;
            var p;
            if (s > h - p) {
                s = h - p;
                o.length = s;
            }
            for (var g = 0; s > g; g++) {
                var v = this.getRawIndex(p + g);
                var m = Math.floor(v / u);
                var y = v % u;
                o[g] = l[m][y];
            }
            var _ = n(o);
            var x = this.getRawIndex(Math.min(p + i(o, _) || 0, h - 1));
            var w = Math.floor(x / u);
            var b = x % u;
            l[w][b] = _;
            if (_ < c[0]) {
                c[0] = _;
            }
            if (_ > c[1]) {
                c[1] = _;
            }
            f[d++] = x;
        }
        r._count = d;
        r._indices = f;
        r.getRawIndex = ll;
        return r;
    };
    gv.getItemModel = function (t) {
        var e = this.hostModel;
        return new Kr(this.getRawDataItem(t), e, e && e.ecModel);
    };
    gv.diff = function (t) {
        var that = this;
        return new Ks(
            t ? t.getIndices() : [],
            this.getIndices(),
            function (e) {
                return hl(t, e);
            },
            function (t) {
                return hl(that, t);
            }
        );
    };
    gv.getVisual = function (t) {
        var e = this._visual;
        return e && e[t];
    };
    gv.setVisual = function (t, e) {
        if (ov(t)) {
            for (var n in t) {
                if (t.hasOwnProperty(n)) {
                    this.setVisual(n, t[n]);
                }
            }
        } else {
            this._visual = this._visual || {};
            this._visual[t] = e;
        }
    };
    gv.setLayout = function (t, e) {
        if (ov(t)) {
            for (var n in t) {
                if (t.hasOwnProperty(n)) {
                    this.setLayout(n, t[n]);
                }
            }
        } else {
            this._layout[t] = e;
        }
    };
    gv.getLayout = function (t) {
        return this._layout[t];
    };
    gv.getItemLayout = function (t) {
        return this._itemLayouts[t];
    };
    gv.setItemLayout = function (t, e, n) {
        this._itemLayouts[t] = n ? o(this._itemLayouts[t] || {}, e) : e;
    };
    gv.clearItemLayouts = function () {
        this._itemLayouts.length = 0;
    };
    gv.getItemVisual = function (t, e, n) {
        var i = this._itemVisuals[t];
        var r = i && i[e];
        return null != r || n ? r : this.getVisual(e);
    };
    gv.setItemVisual = function (t, e, n) {
        var i = this._itemVisuals[t] || {};
        var r = this.hasItemVisual;
        this._itemVisuals[t] = i;
        if (ov(e)) {
            for (var a in e) {
                if (e.hasOwnProperty(a)) {
                    i[a] = e[a];
                    r[a] = true;
                }
            }
        } else {
            i[e] = n;
            r[e] = true;
        }
    };
    gv.clearAllVisual = function () {
        this._visual = {};
        this._itemVisuals = [];
        this.hasItemVisual = {};
    };
    var vv = function (t) {
        t.seriesIndex = this.seriesIndex;
        t.dataIndex = this.dataIndex;
        t.dataType = this.dataType;
    };
    gv.setItemGraphicEl = function (t, e) {
        var n = this.hostModel;
        if (e) {
            e.dataIndex = t;
            e.dataType = this.dataType;
            e.seriesIndex = n && n.seriesIndex;
            if ('group' === e.type) {
                e.traverse(vv, e);
            }
        }
        this._graphicEls[t] = e;
    };
    gv.getItemGraphicEl = function (t) {
        return this._graphicEls[t];
    };
    gv.eachItemGraphicEl = function (t, e) {
        d(this._graphicEls, function (n, i) {
            if (n && t) {
                t.call(e, n, i);
            }
        });
    };
    gv.cloneShallow = function (t) {
        if (!t) {
            var e = p(this.dimensions, this.getDimensionInfo, this);
            t = new pv(e, this.hostModel);
        }
        t._storage = this._storage;
        rl(t, this);
        if (this._indices) {
            var n = this._indices.constructor;
            t._indices = new n(this._indices);
        } else {
            t._indices = null;
        }
        t.getRawIndex = t._indices ? ll : sl;
        return t;
    };
    gv.wrapMethod = function (t, e) {
        var n = this[t];
        if ('function' == typeof n) {
            this.__wrappedMethods = this.__wrappedMethods || [];
            this.__wrappedMethods.push(t);
            this[t] = function () {
                var t = n.apply(this, arguments);
                return e.apply(this, [t].concat(A(arguments)));
            };
        }
    };
    gv.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'map'];
    gv.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];
    var mv = function (t, e) {
        e = e || {};
        return pl(e.coordDimensions || [], t, {
            dimsDef: e.dimensionsDefine || t.dimensionsDefine,
            encodeDef: e.encodeDefine || t.encodeDefine,
            dimCount: e.dimensionsCount,
            generateCoord: e.generateCoord,
            generateCoordCount: e.generateCoordCount
        });
    };
    $p.extend({
        type: 'series.line',
        dependencies: ['grid', 'polar'],
        getInitialData: function () {
            return xl(this.getSource(), this);
        },
        defaultOption: {
            zlevel: 0,
            z: 2,
            coordinateSystem: 'cartesian2d',
            legendHoverLink: true,
            hoverAnimation: true,
            clipOverflow: true,
            label: {
                position: 'top'
            },
            lineStyle: {
                width: 2,
                type: 'solid'
            },
            step: false,
            smooth: false,
            smoothMonotone: null,
            symbol: 'emptyCircle',
            symbolSize: 4,
            symbolRotate: null,
            showSymbol: true,
            showAllSymbol: 'auto',
            connectNulls: false,
            sampling: 'none',
            animationEasing: 'linear',
            progressive: 0,
            hoverLayerThreshold: 1 / 0
        }
    });
    var yv = yr({
        type: 'triangle',
        shape: {
            cx: 0,
            cy: 0,
            width: 0,
            height: 0
        },
        buildPath: function (t, e) {
            var n = e.cx;
            var i = e.cy;
            var r = e.width / 2;
            var a = e.height / 2;
            t.moveTo(n, i - a);
            t.lineTo(n + r, i + a);
            t.lineTo(n - r, i + a);
            t.closePath();
        }
    });
    var _v = yr({
        type: 'diamond',
        shape: {
            cx: 0,
            cy: 0,
            width: 0,
            height: 0
        },
        buildPath: function (t, e) {
            var n = e.cx;
            var i = e.cy;
            var r = e.width / 2;
            var a = e.height / 2;
            t.moveTo(n, i - a);
            t.lineTo(n + r, i);
            t.lineTo(n, i + a);
            t.lineTo(n - r, i);
            t.closePath();
        }
    });
    var xv = yr({
        type: 'pin',
        shape: {
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        buildPath: function (t, e) {
            var n = e.x;
            var i = e.y;
            var r = (e.width / 5) * 3;
            var a = Math.max(r, e.height);
            var o = r / 2;
            var s = (o * o) / (a - o);
            var l = i - a + o + s;
            var h = Math.asin(s / o);
            var u = Math.cos(h) * o;
            var c = Math.sin(h);
            var f = Math.cos(h);
            var d = 0.6 * o;
            var p = 0.7 * o;
            t.moveTo(n - u, l + s);
            t.arc(n, l, o, Math.PI - h, 2 * Math.PI + h);
            t.bezierCurveTo(n + u - c * d, l + s + f * d, n, i - p, n, i);
            t.bezierCurveTo(n, i - p, n - u + c * d, l + s + f * d, n - u, l + s);
            t.closePath();
        }
    });
    var wv = yr({
        type: 'arrow',
        shape: {
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        buildPath: function (t, e) {
            var n = e.height;
            var i = e.width;
            var r = e.x;
            var a = e.y;
            var o = (i / 3) * 2;
            t.moveTo(r, a);
            t.lineTo(r + o, a + n);
            t.lineTo(r, a + (n / 4) * 3);
            t.lineTo(r - o, a + n);
            t.lineTo(r, a);
            t.closePath();
        }
    });
    var bv = {
        line: Ed,
        rect: Od,
        roundRect: Od,
        square: Od,
        circle: kd,
        diamond: _v,
        pin: xv,
        arrow: wv,
        triangle: yv
    };
    var Mv = {
        line: function (t, e, n, i, r) {
            r.x1 = t;
            r.y1 = e + i / 2;
            r.x2 = t + n;
            r.y2 = e + i / 2;
        },
        rect: function (t, e, n, i, r) {
            r.x = t;
            r.y = e;
            r.width = n;
            r.height = i;
        },
        roundRect: function (t, e, n, i, r) {
            r.x = t;
            r.y = e;
            r.width = n;
            r.height = i;
            r.r = Math.min(n, i) / 4;
        },
        square: function (t, e, n, i, r) {
            var a = Math.min(n, i);
            r.x = t;
            r.y = e;
            r.width = a;
            r.height = a;
        },
        circle: function (t, e, n, i, r) {
            r.cx = t + n / 2;
            r.cy = e + i / 2;
            r.r = Math.min(n, i) / 2;
        },
        diamond: function (t, e, n, i, r) {
            r.cx = t + n / 2;
            r.cy = e + i / 2;
            r.width = n;
            r.height = i;
        },
        pin: function (t, e, n, i, r) {
            r.x = t + n / 2;
            r.y = e + i / 2;
            r.width = n;
            r.height = i;
        },
        arrow: function (t, e, n, i, r) {
            r.x = t + n / 2;
            r.y = e + i / 2;
            r.width = n;
            r.height = i;
        },
        triangle: function (t, e, n, i, r) {
            r.cx = t + n / 2;
            r.cy = e + i / 2;
            r.width = n;
            r.height = i;
        }
    };
    var Sv = {};
    d(bv, function (t, e) {
        Sv[e] = new t();
    });
    var Cv = yr({
        type: 'symbol',
        shape: {
            symbolType: '',
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        beforeBrush: function () {
            var t = this.style;
            var e = this.shape;
            if ('pin' === e.symbolType && 'inside' === t.textPosition) {
                t.textPosition = ['50%', '40%'];
                t.textAlign = 'center';
                t.textVerticalAlign = 'middle';
            }
        },
        buildPath: function (t, e, n) {
            var i = e.symbolType;
            var r = Sv[i];
            if ('none' !== e.symbolType) {
                r || ((i = 'rect'), (r = Sv[i]));
                Mv[i](e.x, e.y, e.width, e.height, r.shape);
                r.buildPath(t, r.shape, n);
            }
        }
    });
    var Tv = Tl.prototype;
    var kv = (Tl.getSymbolSize = function (t, e) {
        var n = t.getItemVisual(e, 'symbolSize');
        return n instanceof Array ? n.slice() : [+n, +n];
    });
    Tv._createSymbol = function (t, e, n, i, r) {
        this.removeAll();
        var a = e.getItemVisual(n, 'color');
        var o = Sl(t, -1, -1, 2, 2, a, r);
        o.attr({
            z2: 100,
            culling: true,
            scale: kl(i)
        });
        o.drift = Dl;
        this._symbolType = t;
        this.add(o);
    };
    Tv.stopSymbolAnimation = function (t) {
        this.childAt(0).stopAnimation(t);
    };
    Tv.getSymbolPath = function () {
        return this.childAt(0);
    };
    Tv.getScale = function () {
        return this.childAt(0).scale;
    };
    Tv.highlight = function () {
        this.childAt(0).trigger('emphasis');
    };
    Tv.downplay = function () {
        this.childAt(0).trigger('normal');
    };
    Tv.setZ = function (t, e) {
        var n = this.childAt(0);
        n.zlevel = t;
        n.z = e;
    };
    Tv.setDraggable = function (t) {
        var e = this.childAt(0);
        e.draggable = t;
        e.cursor = t ? 'move' : 'pointer';
    };
    Tv.updateData = function (t, e, n) {
        this.silent = false;
        var i = t.getItemVisual(e, 'symbol') || 'circle';
        var r = t.hostModel;
        var a = kv(t, e);
        var o = i !== this._symbolType;
        if (o) {
            var s = t.getItemVisual(e, 'symbolKeepAspect');
            this._createSymbol(i, t, e, a, s);
        } else {
            var l = this.childAt(0);
            l.silent = false;
            jr(
                l,
                {
                    scale: kl(a)
                },
                r,
                e
            );
        }
        this._updateCommon(t, e, a, n);
        if (o) {
            var l = this.childAt(0);
            var h = n && n.fadeIn;
            var u = {
                scale: l.scale.slice()
            };
            if (h) {
                u.style = {
                    opacity: l.style.opacity
                };
            }
            l.scale = [0, 0];
            if (h) {
                l.style.opacity = 0;
            }
            Zr(l, u, r, e);
        }
        this._seriesModel = r;
    };
    var Dv = ['itemStyle'];
    var Iv = ['emphasis', 'itemStyle'];
    var Av = ['label'];
    var Lv = ['emphasis', 'label'];
    Tv._updateCommon = function (t, e, n, i) {
        function r(e) {
            return b ? t.getName(e) : Cl(t, e);
        }
        var a = this.childAt(0);
        var s = t.hostModel;
        var l = t.getItemVisual(e, 'color');
        if ('image' !== a.type) {
            a.useStyle({
                strokeNoScale: true
            });
        }
        var h = i && i.itemStyle;
        var u = i && i.hoverItemStyle;
        var c = i && i.symbolRotate;
        var f = i && i.symbolOffset;
        var d = i && i.labelModel;
        var p = i && i.hoverLabelModel;
        var g = i && i.hoverAnimation;
        var v = i && i.cursorStyle;
        if (!i || t.hasItemOption) {
            var m = i && i.itemModel ? i.itemModel : t.getItemModel(e);
            h = m.getModel(Dv).getItemStyle(['color']);
            u = m.getModel(Iv).getItemStyle();
            c = m.getShallow('symbolRotate');
            f = m.getShallow('symbolOffset');
            d = m.getModel(Av);
            p = m.getModel(Lv);
            g = m.getShallow('hoverAnimation');
            v = m.getShallow('cursor');
        } else {
            u = o({}, u);
        }
        var y = a.style;
        a.attr('rotation', ((c || 0) * Math.PI) / 180 || 0);
        if (f) {
            a.attr('position', [aa(f[0], n[0]), aa(f[1], n[1])]);
        }
        if (v) {
            a.attr('cursor', v);
        }
        a.setColor(l, i && i.symbolInnerColor);
        a.setStyle(h);
        var _ = t.getItemVisual(e, 'opacity');
        if (null != _) {
            y.opacity = _;
        }
        var x = t.getItemVisual(e, 'liftZ');
        var w = a.__z2Origin;
        null != x ? null == w && ((a.__z2Origin = a.z2), (a.z2 += x)) : null != w && ((a.z2 = w), (a.__z2Origin = null));
        var b = i && i.useNameLabel;
        Nr(y, u, d, p, {
            labelFetcher: s,
            labelDataIndex: e,
            defaultText: r,
            isRectText: true,
            autoColor: l
        });
        a.off('mouseover').off('mouseout').off('emphasis').off('normal');
        a.hoverStyle = u;
        zr(a);
        var M = kl(n);
        if (g && s.isAnimationEnabled()) {
            var S = function () {
                if (!this.incremental) {
                    var t = M[1] / M[0];
                    this.animateTo(
                        {
                            scale: [Math.max(1.1 * M[0], M[0] + 3), Math.max(1.1 * M[1], M[1] + 3 * t)]
                        },
                        400,
                        'elasticOut'
                    );
                }
            };
            var C = function () {
                this.incremental ||
                    this.animateTo(
                        {
                            scale: M
                        },
                        400,
                        'elasticOut'
                    );
            };
            a.on('mouseover', S).on('mouseout', C).on('emphasis', S).on('normal', C);
        }
    };
    Tv.fadeOut = function (t, e) {
        var n = this.childAt(0);
        this.silent = n.silent = true;
        if (!(e && e.keepLabel)) {
            n.style.text = null;
        }
        jr(
            n,
            {
                style: {
                    opacity: 0
                },
                scale: [0, 0]
            },
            this._seriesModel,
            this.dataIndex,
            t
        );
    };
    u(Tl, mc);
    var Pv = Il.prototype;
    Pv.updateData = function (t, e) {
        e = Ll(e);
        var n = this.group;
        var i = t.hostModel;
        var r = this._data;
        var a = this._symbolCtor;
        var o = Pl(t);
        r || n.removeAll();
        t.diff(r)
            .add(function (i) {
                var r = t.getItemLayout(i);
                if (Al(t, r, i, e)) {
                    var s = new a(t, i, o);
                    s.attr('position', r);
                    t.setItemGraphicEl(i, s);
                    n.add(s);
                }
            })
            .update(function (s, l) {
                var h = r.getItemGraphicEl(l);
                var u = t.getItemLayout(s);
                return Al(t, u, s, e)
                    ? (h
                          ? (h.updateData(t, s, o),
                            jr(
                                h,
                                {
                                    position: u
                                },
                                i
                            ))
                          : ((h = new a(t, s)), h.attr('position', u)),
                      n.add(h),
                      void t.setItemGraphicEl(s, h))
                    : void n.remove(h);
            })
            .remove(function (t) {
                var e = r.getItemGraphicEl(t);
                if (e) {
                    e.fadeOut(function () {
                        n.remove(e);
                    });
                }
            })
            .execute();
        this._data = t;
    };
    Pv.isPersistent = function () {
        return true;
    };
    Pv.updateLayout = function () {
        var t = this._data;
        if (t) {
            t.eachItemGraphicEl(function (e, n) {
                var i = t.getItemLayout(n);
                e.attr('position', i);
            });
        }
    };
    Pv.incrementalPrepareUpdate = function (t) {
        this._seriesScope = Pl(t);
        this._data = null;
        this.group.removeAll();
    };
    Pv.incrementalUpdate = function (t, e, n) {
        function i(t) {
            t.isGroup || (t.incremental = t.useHoverLayer = true);
        }
        n = Ll(n);
        for (var r = t.start; r < t.end; r++) {
            var a = e.getItemLayout(r);
            if (Al(e, a, r, n)) {
                var o = new this._symbolCtor(e, r, this._seriesScope);
                o.traverse(i);
                o.attr('position', a);
                this.group.add(o);
                e.setItemGraphicEl(r, o);
            }
        }
    };
    Pv.remove = function (t) {
        var e = this.group;
        var n = this._data;
        n && t
            ? n.eachItemGraphicEl(function (t) {
                  t.fadeOut(function () {
                      e.remove(t);
                  });
              })
            : e.removeAll();
    };
    var Ov = function (t, e, n, i, r, a, o, s) {
        for (l = Bl(t, e), h = [], u = [], c = [], f = [], d = [], p = [], g = [], v = Ol(r, e, o), m = Ol(a, t, s), y = 0, void 0; y < l.length; y++) {
            var l;
            var h;
            var u;
            var c;
            var f;
            var d;
            var p;
            var g;
            var v;
            var m;
            var y;
            var _ = l[y];
            var x = true;
            switch (_.cmd) {
                case '=':
                    var w = t.getItemLayout(_.idx);
                    var b = e.getItemLayout(_.idx1);
                    if (isNaN(w[0]) || isNaN(w[1])) {
                        w = b.slice();
                    }
                    h.push(w);
                    u.push(b);
                    c.push(n[_.idx]);
                    f.push(i[_.idx1]);
                    g.push(e.getRawIndex(_.idx1));
                    break;
                case '+':
                    var M = _.idx;
                    h.push(r.dataToPoint([e.get(v.dataDimsForPoint[0], M), e.get(v.dataDimsForPoint[1], M)]));
                    u.push(e.getItemLayout(M).slice());
                    c.push(Rl(v, r, e, M));
                    f.push(i[M]);
                    g.push(e.getRawIndex(M));
                    break;
                case '-':
                    var M = _.idx;
                    var S = t.getRawIndex(M);
                    S !== M
                        ? (h.push(t.getItemLayout(M)),
                          u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0], M), t.get(m.dataDimsForPoint[1], M)])),
                          c.push(n[M]),
                          f.push(Rl(m, a, t, M)),
                          g.push(S))
                        : (x = false);
            }
            if (x) {
                d.push(_);
                p.push(p.length);
            }
        }
        p.sort(function (t, e) {
            return g[t] - g[e];
        });
        for (C = [], T = [], k = [], D = [], I = [], y = 0, void 0; y < p.length; y++) {
            var C;
            var T;
            var k;
            var D;
            var I;
            var y;
            var M = p[y];
            C[y] = h[M];
            T[y] = u[M];
            k[y] = c[M];
            D[y] = f[M];
            I[y] = d[M];
        }
        return {
            current: C,
            next: T,
            stackedOnCurrent: k,
            stackedOnNext: D,
            status: I
        };
    };
    var Ev = Q;
    var Rv = J;
    var Bv = G;
    var zv = V;
    var Nv = [];
    var Fv = [];
    var Vv = [];
    var Wv = hr.extend({
        type: 'ec-polyline',
        shape: {
            points: [],
            smooth: 0,
            smoothConstraint: true,
            smoothMonotone: null,
            connectNulls: false
        },
        style: {
            fill: null,
            stroke: '#000'
        },
        brush: Id(hr.prototype.brush),
        buildPath: function (t, e) {
            var n = e.points;
            var i = 0;
            var r = n.length;
            var a = Wl(n, e.smoothConstraint);
            if (e.connectNulls) {
                for (; r > 0 && zl(n[r - 1]); r--) {}
                for (; r > i && zl(n[i]); i++) {}
            }
            for (; r > i; ) {
                i += Nl(t, n, i, r, r, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1;
            }
        }
    });
    var Hv = hr.extend({
        type: 'ec-polygon',
        shape: {
            points: [],
            stackedOnPoints: [],
            smooth: 0,
            stackedOnSmooth: 0,
            smoothConstraint: true,
            smoothMonotone: null,
            connectNulls: false
        },
        brush: Id(hr.prototype.brush),
        buildPath: function (t, e) {
            var n = e.points;
            var i = e.stackedOnPoints;
            var r = 0;
            var a = n.length;
            var o = e.smoothMonotone;
            var s = Wl(n, e.smoothConstraint);
            var l = Wl(i, e.smoothConstraint);
            if (e.connectNulls) {
                for (; a > 0 && zl(n[a - 1]); a--) {}
                for (; a > r && zl(n[r]); r++) {}
            }
            for (; a > r; ) {
                var h = Nl(t, n, r, a, a, 1, s.min, s.max, e.smooth, o, e.connectNulls);
                Nl(t, i, r + h - 1, h, a, -1, l.min, l.max, e.stackedOnSmooth, o, e.connectNulls);
                r += h + 1;
                t.closePath();
            }
        }
    });
    zo.extend({
        type: 'line',
        init: function () {
            var t = new mc();
            var e = new Il();
            this.group.add(e.group);
            this._symbolDraw = e;
            this._lineGroup = t;
        },
        render: function (t, e, n) {
            var i = t.coordinateSystem;
            var r = this.group;
            var a = t.getData();
            var o = t.getModel('lineStyle');
            var l = t.getModel('areaStyle');
            var h = a.mapArray(a.getItemLayout);
            var u = 'polar' === i.type;
            var c = this._coordSys;
            var f = this._symbolDraw;
            var d = this._polyline;
            var p = this._polygon;
            var g = this._lineGroup;
            var v = t.get('animation');
            var m = !l.isEmpty();
            var y = l.get('origin');
            var _ = Ol(i, a, y);
            var x = Xl(i, a, _);
            var w = t.get('showSymbol');
            var b = w && !u && Kl(t, a, i);
            var M = this._data;
            if (M) {
                M.eachItemGraphicEl(function (t, e) {
                    if (t.__temp) {
                        r.remove(t);
                        M.setItemGraphicEl(e, null);
                    }
                });
            }
            w || f.remove();
            r.add(g);
            var S = !u && t.get('step');
            d && c.type === i.type && S === this._step
                ? (m && !p ? (p = this._newPolygon(h, x, i, v)) : p && !m && (g.remove(p), (p = this._polygon = null)),
                  g.setClipPath(jl(i, false, false, t)),
                  w &&
                      f.updateData(a, {
                          isIgnore: b,
                          clipShape: jl(i, false, true, t)
                      }),
                  a.eachItemGraphicEl(function (t) {
                      t.stopAnimation(true);
                  }),
                  (Hl(this._stackedOnPoints, x) && Hl(this._points, h)) ||
                      (v
                          ? this._updateAnimation(a, x, i, n, S, y)
                          : (S && ((h = Zl(h, i, S)), (x = Zl(x, i, S))),
                            d.setShape({
                                points: h
                            }),
                            p &&
                                p.setShape({
                                    points: h,
                                    stackedOnPoints: x
                                }))))
                : (w &&
                      f.updateData(a, {
                          isIgnore: b,
                          clipShape: jl(i, false, true, t)
                      }),
                  S && ((h = Zl(h, i, S)), (x = Zl(x, i, S))),
                  (d = this._newPolyline(h, i, v)),
                  m && (p = this._newPolygon(h, x, i, v)),
                  g.setClipPath(jl(i, true, false, t)));
            var C = $l(a, i) || a.getVisual('color');
            d.useStyle(
                s(o.getLineStyle(), {
                    fill: 'none',
                    stroke: C,
                    lineJoin: 'bevel'
                })
            );
            var T = t.get('smooth');
            T = Gl(t.get('smooth'));
            d.setShape({
                smooth: T,
                smoothMonotone: t.get('smoothMonotone'),
                connectNulls: t.get('connectNulls')
            });
            if (p) {
                var k = a.getCalculationInfo('stackedOnSeries');
                var D = 0;
                p.useStyle(
                    s(l.getAreaStyle(), {
                        fill: C,
                        opacity: 0.7,
                        lineJoin: 'bevel'
                    })
                );
                if (k) {
                    D = Gl(k.get('smooth'));
                }
                p.setShape({
                    smooth: T,
                    stackedOnSmooth: D,
                    smoothMonotone: t.get('smoothMonotone'),
                    connectNulls: t.get('connectNulls')
                });
            }
            this._data = a;
            this._coordSys = i;
            this._stackedOnPoints = x;
            this._points = h;
            this._step = S;
            this._valueOrigin = y;
        },
        dispose: function () {},
        highlight: function (t, e, n, i) {
            var r = t.getData();
            var a = yi(r, i);
            if (!(a instanceof Array) && null != a && a >= 0) {
                var o = r.getItemGraphicEl(a);
                if (!o) {
                    var s = r.getItemLayout(a);
                    if (!s) {
                        return;
                    }
                    o = new Tl(r, a);
                    o.position = s;
                    o.setZ(t.get('zlevel'), t.get('z'));
                    o.ignore = isNaN(s[0]) || isNaN(s[1]);
                    o.__temp = true;
                    r.setItemGraphicEl(a, o);
                    o.stopSymbolAnimation(true);
                    this.group.add(o);
                }
                o.highlight();
            } else {
                zo.prototype.highlight.call(this, t, e, n, i);
            }
        },
        downplay: function (t, e, n, i) {
            var r = t.getData();
            var a = yi(r, i);
            if (null != a && a >= 0) {
                var o = r.getItemGraphicEl(a);
                if (o) {
                    o.__temp ? (r.setItemGraphicEl(a, null), this.group.remove(o)) : o.downplay();
                }
            } else {
                zo.prototype.downplay.call(this, t, e, n, i);
            }
        },
        _newPolyline: function (t) {
            var e = this._polyline;
            if (e) {
                this._lineGroup.remove(e);
            }
            e = new Wv({
                shape: {
                    points: t
                },
                silent: true,
                z2: 10
            });
            this._lineGroup.add(e);
            this._polyline = e;
            return e;
        },
        _newPolygon: function (t, e) {
            var n = this._polygon;
            if (n) {
                this._lineGroup.remove(n);
            }
            n = new Hv({
                shape: {
                    points: t,
                    stackedOnPoints: e
                },
                silent: true
            });
            this._lineGroup.add(n);
            this._polygon = n;
            return n;
        },
        _updateAnimation: function (t, e, n, i, r, a) {
            var o = this._polyline;
            var s = this._polygon;
            var l = t.hostModel;
            var h = Ov(this._data, t, this._stackedOnPoints, e, this._coordSys, n, this._valueOrigin, a);
            var u = h.current;
            var c = h.stackedOnCurrent;
            var f = h.next;
            var d = h.stackedOnNext;
            if (r) {
                u = Zl(h.current, n, r);
                c = Zl(h.stackedOnCurrent, n, r);
                f = Zl(h.next, n, r);
                d = Zl(h.stackedOnNext, n, r);
            }
            o.shape.__points = h.current;
            o.shape.points = u;
            jr(
                o,
                {
                    shape: {
                        points: f
                    }
                },
                l
            );
            if (s) {
                s.setShape({
                    points: u,
                    stackedOnPoints: c
                });
                jr(
                    s,
                    {
                        shape: {
                            points: f,
                            stackedOnPoints: d
                        }
                    },
                    l
                );
            }
            for (p = [], g = h.status, v = 0, void 0; v < g.length; v++) {
                var p;
                var g;
                var v;
                var m = g[v].cmd;
                if ('=' === m) {
                    var y = t.getItemGraphicEl(g[v].idx1);
                    if (y) {
                        p.push({
                            el: y,
                            ptIdx: v
                        });
                    }
                }
            }
            if (o.animators && o.animators.length) {
                o.animators[0].during(function () {
                    for (var t = 0; t < p.length; t++) {
                        var e = p[t].el;
                        e.attr('position', o.shape.__points[p[t].ptIdx]);
                    }
                });
            }
        },
        remove: function () {
            var t = this.group;
            var e = this._data;
            this._lineGroup.removeAll();
            this._symbolDraw.remove(true);
            if (e) {
                e.eachItemGraphicEl(function (n, i) {
                    if (n.__temp) {
                        t.remove(n);
                        e.setItemGraphicEl(i, null);
                    }
                });
            }
            this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null;
        }
    });
    var Gv = function (t, e, n) {
        return {
            seriesType: t,
            performRawSeries: true,
            reset: function (t, i) {
                function r(e, n) {
                    if ('function' == typeof s) {
                        var i = t.getRawValue(n);
                        var r = t.getDataParams(n);
                        e.setItemVisual(n, 'symbolSize', s(i, r));
                    }
                    if (e.hasItemOption) {
                        var a = e.getItemModel(n);
                        var o = a.getShallow('symbol', true);
                        var l = a.getShallow('symbolSize', true);
                        var h = a.getShallow('symbolKeepAspect', true);
                        if (null != o) {
                            e.setItemVisual(n, 'symbol', o);
                        }
                        if (null != l) {
                            e.setItemVisual(n, 'symbolSize', l);
                        }
                        if (null != h) {
                            e.setItemVisual(n, 'symbolKeepAspect', h);
                        }
                    }
                }
                var a = t.getData();
                var o = t.get('symbol') || e;
                var s = t.get('symbolSize');
                var l = t.get('symbolKeepAspect');
                a.setVisual({
                    legendSymbol: n || o,
                    symbol: o,
                    symbolSize: s,
                    symbolKeepAspect: l
                });
                if (!i.isSeriesFiltered(t)) {
                    var h = 'function' == typeof s;
                    return {
                        dataEach: a.hasItemOption || h ? r : null
                    };
                }
            }
        };
    };
    var qv = function (t) {
        return {
            seriesType: t,
            plan: Jp(),
            reset: function (t) {
                function e(t, e) {
                    for (n = t.end - t.start, r = a && new Float32Array(n * s), l = t.start, h = 0, u = [], c = [], void 0; l < t.end; l++) {
                        var n;
                        var r;
                        var l;
                        var h;
                        var u;
                        var c;
                        var f;
                        if (1 === s) {
                            var d = e.get(o[0], l);
                            f = !isNaN(d) && i.dataToPoint(d, null, c);
                        } else {
                            var d = (u[0] = e.get(o[0], l));
                            var p = (u[1] = e.get(o[1], l));
                            f = !isNaN(d) && !isNaN(p) && i.dataToPoint(u, null, c);
                        }
                        a ? ((r[h++] = f ? f[0] : 0 / 0), (r[h++] = f ? f[1] : 0 / 0)) : e.setItemLayout(l, (f && f.slice()) || [0 / 0, 0 / 0]);
                    }
                    if (a) {
                        e.setLayout('symbolPoints', r);
                    }
                }
                var n = t.getData();
                var i = t.coordinateSystem;
                var r = t.pipelineContext;
                var a = r.large;
                if (i) {
                    var o = p(i.dimensions, function (t) {
                        return n.mapDimension(t);
                    }).slice(0, 2);
                    var s = o.length;
                    var l = n.getCalculationInfo('stackResultDimension');
                    if (yl(n, o[0])) {
                        o[0] = l;
                    }
                    if (yl(n, o[1])) {
                        o[1] = l;
                    }
                    return (
                        s && {
                            progress: e
                        }
                    );
                }
            }
        };
    };
    var Xv = {
        average: function (t) {
            for (e = 0, n = 0, i = 0, void 0; i < t.length; i++) {
                var e;
                var n;
                var i;
                isNaN(t[i]) || ((e += t[i]), n++);
            }
            return 0 === n ? 0 / 0 : e / n;
        },
        sum: function (t) {
            for (e = 0, n = 0, void 0; n < t.length; n++) {
                var e;
                var n;
                e += t[n] || 0;
            }
            return e;
        },
        max: function (t) {
            for (e = -1 / 0, n = 0, void 0; n < t.length; n++) {
                var e;
                var n;
                if (t[n] > e) {
                    e = t[n];
                }
            }
            return isFinite(e) ? e : 0 / 0;
        },
        min: function (t) {
            for (e = 1 / 0, n = 0, void 0; n < t.length; n++) {
                var e;
                var n;
                if (t[n] < e) {
                    e = t[n];
                }
            }
            return isFinite(e) ? e : 0 / 0;
        },
        nearest: function (t) {
            return t[0];
        }
    };
    var Uv = function (t) {
        return Math.round(t.length / 2);
    };
    var Yv = function (t) {
        return {
            seriesType: t,
            modifyOutputEnd: true,
            reset: function (t) {
                var e = t.getData();
                var n = t.get('sampling');
                var i = t.coordinateSystem;
                if ('cartesian2d' === i.type && n) {
                    var r = i.getBaseAxis();
                    var a = i.getOtherAxis(r);
                    var o = r.getExtent();
                    var s = o[1] - o[0];
                    var l = Math.round(e.count() / s);
                    if (l > 1) {
                        var h;
                        'string' == typeof n ? (h = Xv[n]) : 'function' == typeof n && (h = n);
                        if (h) {
                            t.setData(e.downSample(e.mapDimension(a.dim), 1 / l, h, Uv));
                        }
                    }
                }
            }
        };
    };
    Jl.prototype.parse = function (t) {
        return t;
    };
    Jl.prototype.getSetting = function (t) {
        return this._setting[t];
    };
    Jl.prototype.contain = function (t) {
        var e = this._extent;
        return t >= e[0] && t <= e[1];
    };
    Jl.prototype.normalize = function (t) {
        var e = this._extent;
        return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
    };
    Jl.prototype.scale = function (t) {
        var e = this._extent;
        return t * (e[1] - e[0]) + e[0];
    };
    Jl.prototype.unionExtent = function (t) {
        var e = this._extent;
        if (t[0] < e[0]) {
            e[0] = t[0];
        }
        if (t[1] > e[1]) {
            e[1] = t[1];
        }
    };
    Jl.prototype.unionExtentFromData = function (t, e) {
        this.unionExtent(t.getApproximateExtent(e));
    };
    Jl.prototype.getExtent = function () {
        return this._extent.slice();
    };
    Jl.prototype.setExtent = function (t, e) {
        var n = this._extent;
        isNaN(t) || (n[0] = t);
        isNaN(e) || (n[1] = e);
    };
    Jl.prototype.isBlank = function () {
        return this._isBlank;
    };
    Jl.prototype.setBlank = function (t) {
        this._isBlank = t;
    };
    Jl.prototype.getLabel = null;
    Ti(Jl);
    Ai(Jl, {
        registerWhenExtend: true
    });
    th.createByAxisModel = function (t) {
        var e = t.option;
        var n = e.data;
        var i = n && p(n, nh);
        return new th({
            categories: i,
            needCollect: !i,
            deduplication: e.dedplication !== false
        });
    };
    var jv = th.prototype;
    jv.getOrdinal = function (t) {
        return eh(this).get(t);
    };
    jv.parseAndCollect = function (t) {
        var e;
        var n = this._needCollect;
        if ('string' != typeof t && !n) {
            return t;
        }
        if (n && !this._deduplication) {
            e = this.categories.length;
            this.categories[e] = t;
            return e;
        }
        var i = eh(this);
        e = i.get(t);
        if (null == e) {
            n ? ((e = this.categories.length), (this.categories[e] = t), i.set(t, e)) : (e = 0 / 0);
        }
        return e;
    };
    var Zv = Jl.prototype;
    var $v = Jl.extend({
        type: 'ordinal',
        init: function (t, e) {
            if (!t || _(t)) {
                t = new th({
                    categories: t
                });
            }
            this._ordinalMeta = t;
            this._extent = e || [0, t.categories.length - 1];
        },
        parse: function (t) {
            return 'string' == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t);
        },
        contain: function (t) {
            t = this.parse(t);
            return Zv.contain.call(this, t) && null != this._ordinalMeta.categories[t];
        },
        normalize: function (t) {
            return Zv.normalize.call(this, this.parse(t));
        },
        scale: function (t) {
            return Math.round(Zv.scale.call(this, t));
        },
        getTicks: function () {
            for (t = [], e = this._extent, n = e[0], void 0; n <= e[1]; ) {
                var t;
                var e;
                var n;
                t.push(n);
                n++;
            }
            return t;
        },
        getLabel: function (t) {
            return this.isBlank() ? void 0 : this._ordinalMeta.categories[t];
        },
        count: function () {
            return this._extent[1] - this._extent[0] + 1;
        },
        unionExtentFromData: function (t, e) {
            this.unionExtent(t.getApproximateExtent(e));
        },
        getOrdinalMeta: function () {
            return this._ordinalMeta;
        },
        niceTicks: N,
        niceExtent: N
    });
    $v.create = function () {
        return new $v();
    };
    var Kv = oa;
    var Qv = oa;
    var Jv = Jl.extend({
        type: 'interval',
        _interval: 0,
        _intervalPrecision: 2,
        setExtent: function (t, e) {
            var n = this._extent;
            isNaN(t) || (n[0] = parseFloat(t));
            isNaN(e) || (n[1] = parseFloat(e));
        },
        unionExtent: function (t) {
            var e = this._extent;
            if (t[0] < e[0]) {
                e[0] = t[0];
            }
            if (t[1] > e[1]) {
                e[1] = t[1];
            }
            Jv.prototype.setExtent.call(this, e[0], e[1]);
        },
        getInterval: function () {
            return this._interval;
        },
        setInterval: function (t) {
            this._interval = t;
            this._niceExtent = this._extent.slice();
            this._intervalPrecision = rh(t);
        },
        getTicks: function () {
            return sh(this._interval, this._extent, this._niceExtent, this._intervalPrecision);
        },
        getLabel: function (t, e) {
            if (null == t) {
                return '';
            }
            var n = e && e.precision;
            null == n ? (n = sa(t) || 0) : 'auto' === n && (n = this._intervalPrecision);
            t = Qv(t, n, true);
            return ga(t);
        },
        niceTicks: function (t, e, n) {
            t = t || 5;
            var i = this._extent;
            var r = i[1] - i[0];
            if (isFinite(r)) {
                if (0 > r) {
                    r = -r;
                    i.reverse();
                }
                var a = ih(i, t, e, n);
                this._intervalPrecision = a.intervalPrecision;
                this._interval = a.interval;
                this._niceExtent = a.niceTickExtent;
            }
        },
        niceExtent: function (t) {
            var e = this._extent;
            if (e[0] === e[1]) {
                if (0 !== e[0]) {
                    var n = e[0];
                    t.fixMax ? (e[0] -= n / 2) : ((e[1] += n / 2), (e[0] -= n / 2));
                } else {
                    e[1] = 1;
                }
            }
            var i = e[1] - e[0];
            isFinite(i) || ((e[0] = 0), (e[1] = 1));
            this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
            var r = this._interval;
            t.fixMin || (e[0] = Qv(Math.floor(e[0] / r) * r));
            t.fixMax || (e[1] = Qv(Math.ceil(e[1] / r) * r));
        }
    });
    Jv.create = function () {
        return new Jv();
    };
    var tm = '__ec_stack_';
    var em = 0.5;
    var nm = 'undefined' != typeof Float32Array ? Float32Array : Array;
    var im =
        ({
            seriesType: 'bar',
            plan: Jp(),
            reset: function (t) {
                function e(t, e) {
                    for (c = new nm(2 * t.count), f = [], d = [], p = 0, void 0; null != (n = t.next()); ) {
                        var n;
                        var c;
                        var f;
                        var d;
                        var p;
                        d[h] = e.get(o, n);
                        d[1 - h] = e.get(s, n);
                        f = i.dataToPoint(d, null, f);
                        c[p++] = f[0];
                        c[p++] = f[1];
                    }
                    e.setLayout({
                        largePoints: c,
                        barWidth: u,
                        valueAxisStart: vh(r, a, false),
                        valueAxisHorizontal: l
                    });
                }
                if (ph(t) && gh(t)) {
                    var n = t.getData();
                    var i = t.coordinateSystem;
                    var r = i.getBaseAxis();
                    var a = i.getOtherAxis(r);
                    var o = n.mapDimension(a.dim);
                    var s = n.mapDimension(r.dim);
                    var l = a.isHorizontal();
                    var h = l ? 0 : 1;
                    var u = dh(ch([t]), r, t).width;
                    u > em || (u = em);
                    return {
                        progress: e
                    };
                }
            }
        },
        Jv.prototype);
    var rm = Math.ceil;
    var am = Math.floor;
    var om = 1000;
    var sm = 60 * om;
    var lm = 60 * sm;
    var hm = 24 * lm;
    var um = function (t, e, n, i) {
        for (; i > n; ) {
            var r = (n + i) >>> 1;
            t[r][1] < e ? (n = r + 1) : (i = r);
        }
        return n;
    };
    var cm = Jv.extend({
        type: 'time',
        getLabel: function (t) {
            var e = this._stepLvl;
            var n = new Date(t);
            return xa(e[0], n, this.getSetting('useUTC'));
        },
        niceExtent: function (t) {
            var e = this._extent;
            if (e[0] === e[1]) {
                e[0] -= hm;
                e[1] += hm;
            }
            if (e[1] === -1 / 0 && 1 / 0 === e[0]) {
                var n = new Date();
                e[1] = +new Date(n.getFullYear(), n.getMonth(), n.getDate());
                e[0] = e[1] - hm;
            }
            this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
            var i = this._interval;
            t.fixMin || (e[0] = oa(am(e[0] / i) * i));
            t.fixMax || (e[1] = oa(rm(e[1] / i) * i));
        },
        niceTicks: function (t, e, n) {
            t = t || 10;
            var i = this._extent;
            var r = i[1] - i[0];
            var a = r / t;
            if (null != e && e > a) {
                a = e;
            }
            if (null != n && a > n) {
                a = n;
            }
            var o = fm.length;
            var s = um(fm, a, 0, o);
            var l = fm[Math.min(s, o - 1)];
            var h = l[1];
            if ('year' === l[0]) {
                var u = r / h;
                var c = pa(u / t, true);
                h *= c;
            }
            var f = this.getSetting('useUTC') ? 0 : 60 * new Date(+i[0] || +i[1]).getTimezoneOffset() * 1000;
            var d = [Math.round(rm((i[0] - f) / h) * h + f), Math.round(am((i[1] - f) / h) * h + f)];
            oh(d, i);
            this._stepLvl = l;
            this._interval = h;
            this._niceExtent = d;
        },
        parse: function (t) {
            return +ca(t);
        }
    });
    d(['contain', 'normalize'], function (t) {
        cm.prototype[t] = function (e) {
            return im[t].call(this, this.parse(e));
        };
    });
    var fm = [
        ['hh:mm:ss', om],
        ['hh:mm:ss', 5 * om],
        ['hh:mm:ss', 10 * om],
        ['hh:mm:ss', 15 * om],
        ['hh:mm:ss', 30 * om],
        ['hh:mm\nMM-dd', sm],
        ['hh:mm\nMM-dd', 5 * sm],
        ['hh:mm\nMM-dd', 10 * sm],
        ['hh:mm\nMM-dd', 15 * sm],
        ['hh:mm\nMM-dd', 30 * sm],
        ['hh:mm\nMM-dd', lm],
        ['hh:mm\nMM-dd', 2 * lm],
        ['hh:mm\nMM-dd', 6 * lm],
        ['hh:mm\nMM-dd', 12 * lm],
        ['MM-dd\nyyyy', hm],
        ['MM-dd\nyyyy', 2 * hm],
        ['MM-dd\nyyyy', 3 * hm],
        ['MM-dd\nyyyy', 4 * hm],
        ['MM-dd\nyyyy', 5 * hm],
        ['MM-dd\nyyyy', 6 * hm],
        ['week', 7 * hm],
        ['MM-dd\nyyyy', 10 * hm],
        ['week', 14 * hm],
        ['week', 21 * hm],
        ['month', 31 * hm],
        ['week', 42 * hm],
        ['month', 62 * hm],
        ['week', 42 * hm],
        ['quarter', (380 * hm) / 4],
        ['month', 31 * hm * 4],
        ['month', 31 * hm * 5],
        ['half-year', (380 * hm) / 2],
        ['month', 31 * hm * 8],
        ['month', 31 * hm * 10],
        ['year', 380 * hm]
    ];
    cm.create = function (t) {
        return new cm({
            useUTC: t.ecModel.get('useUTC')
        });
    };
    var dm = Jl.prototype;
    var pm = Jv.prototype;
    var gm = sa;
    var vm = oa;
    var mm = Math.floor;
    var ym = Math.ceil;
    var _m = Math.pow;
    var xm = Math.log;
    var wm = Jl.extend({
        type: 'log',
        base: 10,
        $constructor: function () {
            Jl.apply(this, arguments);
            this._originalScale = new Jv();
        },
        getTicks: function () {
            var t = this._originalScale;
            var e = this._extent;
            var n = t.getExtent();
            return p(
                pm.getTicks.call(this),
                function (i) {
                    var r = oa(_m(this.base, i));
                    r = i === e[0] && t.__fixMin ? mh(r, n[0]) : r;
                    return (r = i === e[1] && t.__fixMax ? mh(r, n[1]) : r);
                },
                this
            );
        },
        getLabel: pm.getLabel,
        scale: function (t) {
            t = dm.scale.call(this, t);
            return _m(this.base, t);
        },
        setExtent: function (t, e) {
            var n = this.base;
            t = xm(t) / xm(n);
            e = xm(e) / xm(n);
            pm.setExtent.call(this, t, e);
        },
        getExtent: function () {
            var t = this.base;
            var e = dm.getExtent.call(this);
            e[0] = _m(t, e[0]);
            e[1] = _m(t, e[1]);
            var n = this._originalScale;
            var i = n.getExtent();
            if (n.__fixMin) {
                e[0] = mh(e[0], i[0]);
            }
            if (n.__fixMax) {
                e[1] = mh(e[1], i[1]);
            }
            return e;
        },
        unionExtent: function (t) {
            this._originalScale.unionExtent(t);
            var e = this.base;
            t[0] = xm(t[0]) / xm(e);
            t[1] = xm(t[1]) / xm(e);
            dm.unionExtent.call(this, t);
        },
        unionExtentFromData: function (t, e) {
            this.unionExtent(t.getApproximateExtent(e));
        },
        niceTicks: function (t) {
            t = t || 10;
            var e = this._extent;
            var n = e[1] - e[0];
            if (!(1 / 0 === n || 0 >= n)) {
                var i = fa(n);
                var r = (t / n) * i;
                for (0.5 >= r && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0; ) {
                    i *= 10;
                }
                var a = [oa(ym(e[0] / i) * i), oa(mm(e[1] / i) * i)];
                this._interval = i;
                this._niceExtent = a;
            }
        },
        niceExtent: function (t) {
            pm.niceExtent.call(this, t);
            var e = this._originalScale;
            e.__fixMin = t.fixMin;
            e.__fixMax = t.fixMax;
        }
    });
    d(['contain', 'normalize'], function (t) {
        wm.prototype[t] = function (e) {
            e = xm(e) / xm(this.base);
            return dm[t].call(this, e);
        };
    });
    wm.create = function () {
        return new wm();
    };
    var bm = function (t) {
        this._axes = {};
        this._dimList = [];
        this.name = t || '';
    };
    bm.prototype = {
        constructor: bm,
        type: 'cartesian',
        getAxis: function (t) {
            return this._axes[t];
        },
        getAxes: function () {
            return p(this._dimList, kh, this);
        },
        getAxesByScale: function (t) {
            t = t.toLowerCase();
            return v(this.getAxes(), function (e) {
                return e.scale.type === t;
            });
        },
        addAxis: function (t) {
            var e = t.dim;
            this._axes[e] = t;
            this._dimList.push(e);
        },
        dataToCoord: function (t) {
            return this._dataCoordConvert(t, 'dataToCoord');
        },
        coordToData: function (t) {
            return this._dataCoordConvert(t, 'coordToData');
        },
        _dataCoordConvert: function (t, e) {
            for (n = this._dimList, i = t instanceof Array ? [] : {}, r = 0, void 0; r < n.length; r++) {
                var n;
                var i;
                var r;
                var a = n[r];
                var o = this._axes[a];
                i[a] = o[e](t[a]);
            }
            return i;
        }
    };
    Dh.prototype = {
        constructor: Dh,
        type: 'cartesian2d',
        dimensions: ['x', 'y'],
        getBaseAxis: function () {
            return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');
        },
        containPoint: function (t) {
            var e = this.getAxis('x');
            var n = this.getAxis('y');
            return e.contain(e.toLocalCoord(t[0])) && n.contain(n.toLocalCoord(t[1]));
        },
        containData: function (t) {
            return this.getAxis('x').containData(t[0]) && this.getAxis('y').containData(t[1]);
        },
        dataToPoint: function (t, e, n) {
            var i = this.getAxis('x');
            var r = this.getAxis('y');
            n = n || [];
            n[0] = i.toGlobalCoord(i.dataToCoord(t[0]));
            n[1] = r.toGlobalCoord(r.dataToCoord(t[1]));
            return n;
        },
        clampData: function (t, e) {
            var n = this.getAxis('x').scale;
            var i = this.getAxis('y').scale;
            var r = n.getExtent();
            var a = i.getExtent();
            var o = n.parse(t[0]);
            var s = i.parse(t[1]);
            e = e || [];
            e[0] = Math.min(Math.max(Math.min(r[0], r[1]), o), Math.max(r[0], r[1]));
            e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1]));
            return e;
        },
        pointToData: function (t, e) {
            var n = this.getAxis('x');
            var i = this.getAxis('y');
            e = e || [];
            e[0] = n.coordToData(n.toLocalCoord(t[0]));
            e[1] = i.coordToData(i.toLocalCoord(t[1]));
            return e;
        },
        getOtherAxis: function (t) {
            return this.getAxis('x' === t.dim ? 'y' : 'x');
        }
    };
    u(Dh, bm);
    var Mm = _i();
    var Sm = [0, 1];
    var Cm = function (t, e, n) {
        this.dim = t;
        this.scale = e;
        this._extent = n || [0, 0];
        this.inverse = false;
        this.onBand = false;
    };
    Cm.prototype = {
        constructor: Cm,
        contain: function (t) {
            var e = this._extent;
            var n = Math.min(e[0], e[1]);
            var i = Math.max(e[0], e[1]);
            return t >= n && i >= t;
        },
        containData: function (t) {
            return this.contain(this.dataToCoord(t));
        },
        getExtent: function () {
            return this._extent.slice();
        },
        getPixelPrecision: function (t) {
            return la(t || this.scale.getExtent(), this._extent);
        },
        setExtent: function (t, e) {
            var n = this._extent;
            n[0] = t;
            n[1] = e;
        },
        dataToCoord: function (t, e) {
            var n = this._extent;
            var i = this.scale;
            t = i.normalize(t);
            if (this.onBand && 'ordinal' === i.type) {
                n = n.slice();
                qh(n, i.count());
            }
            return ra(t, Sm, n, e);
        },
        coordToData: function (t, e) {
            var n = this._extent;
            var i = this.scale;
            if (this.onBand && 'ordinal' === i.type) {
                n = n.slice();
                qh(n, i.count());
            }
            var r = ra(t, n, Sm, e);
            return this.scale.scale(r);
        },
        pointToData: function () {},
        getTicksCoords: function (t) {
            t = t || {};
            var e = t.tickModel || this.getTickModel();
            var n = Ah(this, e);
            var i = n.ticks;
            var r = p(
                i,
                function (t) {
                    return {
                        coord: this.dataToCoord(t),
                        tickValue: t
                    };
                },
                this
            );
            var a = e.get('alignWithLabel');
            Xh(this, r, n.tickCategoryInterval, a, t.clamp);
            return r;
        },
        getViewLabels: function () {
            return Ih(this).labels;
        },
        getLabelModel: function () {
            return this.model.getModel('axisLabel');
        },
        getTickModel: function () {
            return this.model.getModel('axisTick');
        },
        getBandWidth: function () {
            var t = this._extent;
            var e = this.scale.getExtent();
            var n = e[1] - e[0] + (this.onBand ? 1 : 0);
            if (0 === n) {
                n = 1;
            }
            var i = Math.abs(t[1] - t[0]);
            return Math.abs(i) / n;
        },
        isHorizontal: null,
        getRotate: null,
        calculateCategoryInterval: function () {
            return Fh(this);
        }
    };
    var Tm = function (t, e, n, i, r) {
        Cm.call(this, t, e, n);
        this.type = i || 'value';
        this.position = r || 'bottom';
    };
    Tm.prototype = {
        constructor: Tm,
        index: 0,
        getAxesOnZeroOf: null,
        model: null,
        isHorizontal: function () {
            var t = this.position;
            return 'top' === t || 'bottom' === t;
        },
        getGlobalExtent: function (t) {
            var e = this.getExtent();
            e[0] = this.toGlobalCoord(e[0]);
            e[1] = this.toGlobalCoord(e[1]);
            if (t && e[0] > e[1]) {
                e.reverse();
            }
            return e;
        },
        getOtherAxis: function () {
            this.grid.getOtherAxis();
        },
        pointToData: function (t, e) {
            return this.coordToData(this.toLocalCoord(t['x' === this.dim ? 0 : 1]), e);
        },
        toLocalCoord: null,
        toGlobalCoord: null
    };
    u(Tm, Cm);
    var km = {
        show: true,
        zlevel: 0,
        z: 0,
        inverse: false,
        name: '',
        nameLocation: 'end',
        nameRotate: null,
        nameTruncate: {
            maxWidth: null,
            ellipsis: '...',
            placeholder: '.'
        },
        nameTextStyle: {},
        nameGap: 15,
        silent: false,
        triggerEvent: false,
        tooltip: {
            show: false
        },
        axisPointer: {},
        axisLine: {
            show: true,
            onZero: true,
            onZeroAxisIndex: null,
            lineStyle: {
                color: '#333',
                width: 1,
                type: 'solid'
            },
            symbol: ['none', 'none'],
            symbolSize: [10, 15]
        },
        axisTick: {
            show: true,
            inside: false,
            length: 5,
            lineStyle: {
                width: 1
            }
        },
        axisLabel: {
            show: true,
            inside: false,
            rotate: 0,
            showMinLabel: null,
            showMaxLabel: null,
            margin: 8,
            fontSize: 12
        },
        splitLine: {
            show: true,
            lineStyle: {
                color: ['#ccc'],
                width: 1,
                type: 'solid'
            }
        },
        splitArea: {
            show: false,
            areaStyle: {
                color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)']
            }
        }
    };
    var Dm = {};
    Dm.categoryAxis = r(
        {
            boundaryGap: true,
            deduplication: null,
            splitLine: {
                show: false
            },
            axisTick: {
                alignWithLabel: false,
                interval: 'auto'
            },
            axisLabel: {
                interval: 'auto'
            }
        },
        km
    );
    Dm.valueAxis = r(
        {
            boundaryGap: [0, 0],
            splitNumber: 5
        },
        km
    );
    Dm.timeAxis = s(
        {
            scale: true,
            min: 'dataMin',
            max: 'dataMax'
        },
        Dm.valueAxis
    );
    Dm.logAxis = s(
        {
            scale: true,
            logBase: 10
        },
        Dm.valueAxis
    );
    var Im = ['value', 'category', 'time', 'log'];
    var Am = function (t, e, n, i) {
        d(Im, function (o) {
            e.extend({
                type: t + 'Axis.' + o,
                mergeDefaultAndTheme: function (e, i) {
                    var a = this.layoutMode;
                    var s = a ? Sa(e) : {};
                    var l = i.getTheme();
                    r(e, l.get(o + 'Axis'));
                    r(e, this.getDefaultOption());
                    e.type = n(t, e);
                    if (a) {
                        Ma(e, s, a);
                    }
                },
                optionUpdated: function () {
                    var t = this.option;
                    if ('category' === t.type) {
                        this.__ordinalMeta = th.createByAxisModel(this);
                    }
                },
                getCategories: function (t) {
                    var e = this.option;
                    return 'category' === e.type ? (t ? e.data : this.__ordinalMeta.categories) : void 0;
                },
                getOrdinalMeta: function () {
                    return this.__ordinalMeta;
                },
                defaultOption: a([{}, Dm[o + 'Axis'], i], true)
            });
        });
        hp.registerSubTypeDefaulter(t + 'Axis', y(n, t));
    };
    var Lm = {
        getMin: function (t) {
            var e = this.option;
            var n = t || null == e.rangeStart ? e.min : e.rangeStart;
            if (this.axis && null != n && 'dataMin' !== n && 'function' != typeof n && !T(n)) {
                n = this.axis.scale.parse(n);
            }
            return n;
        },
        getMax: function (t) {
            var e = this.option;
            var n = t || null == e.rangeEnd ? e.max : e.rangeEnd;
            if (this.axis && null != n && 'dataMax' !== n && 'function' != typeof n && !T(n)) {
                n = this.axis.scale.parse(n);
            }
            return n;
        },
        getNeedCrossZero: function () {
            var t = this.option;
            return null != t.rangeStart || null != t.rangeEnd ? false : !t.scale;
        },
        getCoordSysModel: N,
        setRange: function (t, e) {
            this.option.rangeStart = t;
            this.option.rangeEnd = e;
        },
        resetRange: function () {
            this.option.rangeStart = this.option.rangeEnd = null;
        }
    };
    var Pm = hp.extend({
        type: 'cartesian2dAxis',
        axis: null,
        init: function () {
            Pm.superApply(this, 'init', arguments);
            this.resetRange();
        },
        mergeOption: function () {
            Pm.superApply(this, 'mergeOption', arguments);
            this.resetRange();
        },
        restoreData: function () {
            Pm.superApply(this, 'restoreData', arguments);
            this.resetRange();
        },
        getCoordSysModel: function () {
            return this.ecModel.queryComponents({
                mainType: 'grid',
                index: this.option.gridIndex,
                id: this.option.gridId
            })[0];
        }
    });
    r(Pm.prototype, Lm);
    var Om = {
        offset: 0
    };
    Am('x', Pm, Uh, Om);
    Am('y', Pm, Uh, Om);
    hp.extend({
        type: 'grid',
        dependencies: ['xAxis', 'yAxis'],
        layoutMode: 'box',
        coordinateSystem: null,
        defaultOption: {
            show: false,
            zlevel: 0,
            z: 0,
            left: '10%',
            top: 60,
            right: '10%',
            bottom: 60,
            containLabel: false,
            backgroundColor: 'rgba(0,0,0,0)',
            borderWidth: 1,
            borderColor: '#ccc'
        }
    });
    var Em = jh.prototype;
    Em.type = 'grid';
    Em.axisPointerEnabled = true;
    Em.getRect = function () {
        return this._rect;
    };
    Em.update = function (t, e) {
        var n = this._axesMap;
        this._updateScale(t, this.model);
        d(n.x, function (t) {
            xh(t.scale, t.model);
        });
        d(n.y, function (t) {
            xh(t.scale, t.model);
        });
        d(n.x, function (t) {
            Zh(n, 'y', t);
        });
        d(n.y, function (t) {
            Zh(n, 'x', t);
        });
        this.resize(this.model, e);
    };
    Em.resize = function (t, e, n) {
        function i() {
            d(a, function (t) {
                var e = t.isHorizontal();
                var n = e ? [0, r.width] : [0, r.height];
                var i = t.inverse ? 1 : 0;
                t.setExtent(n[i], n[1 - i]);
                Kh(t, e ? r.x : r.y);
            });
        }
        var r = ba(t.getBoxLayoutParams(), {
            width: e.getWidth(),
            height: e.getHeight()
        });
        this._rect = r;
        var a = this._axesList;
        i();
        if (!n && t.get('containLabel')) {
            d(a, function (t) {
                if (!t.model.get('axisLabel.inside')) {
                    var e = Ch(t);
                    if (e) {
                        var n = t.isHorizontal() ? 'height' : 'width';
                        var i = t.model.get('axisLabel.margin');
                        r[n] -= e[n] + i;
                        'top' === t.position ? (r.y += e.height + i) : 'left' === t.position && (r.x += e.width + i);
                    }
                }
            });
            i();
        }
    };
    Em.getAxis = function (t, e) {
        var n = this._axesMap[t];
        if (null != n) {
            if (null == e) {
                for (var i in n) {
                    if (n.hasOwnProperty(i)) {
                        return n[i];
                    }
                }
            }
            return n[e];
        }
    };
    Em.getAxes = function () {
        return this._axesList.slice();
    };
    Em.getCartesian = function (t, e) {
        if (null != t && null != e) {
            var n = 'x' + t + 'y' + e;
            return this._coordsMap[n];
        }
        if (b(t)) {
            e = t.yAxisIndex;
            t = t.xAxisIndex;
        }
        for (i = 0, r = this._coordsList, void 0; i < r.length; i++) {
            var i;
            var r;
            if (r[i].getAxis('x').index === t || r[i].getAxis('y').index === e) {
                return r[i];
            }
        }
    };
    Em.getCartesians = function () {
        return this._coordsList.slice();
    };
    Em.convertToPixel = function (t, e, n) {
        var i = this._findConvertTarget(t, e);
        return i.cartesian ? i.cartesian.dataToPoint(n) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(n)) : null;
    };
    Em.convertFromPixel = function (t, e, n) {
        var i = this._findConvertTarget(t, e);
        return i.cartesian ? i.cartesian.pointToData(n) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(n)) : null;
    };
    Em._findConvertTarget = function (t, e) {
        var n;
        var i;
        var r = e.seriesModel;
        var a = e.xAxisModel || (r && r.getReferringComponents('xAxis')[0]);
        var o = e.yAxisModel || (r && r.getReferringComponents('yAxis')[0]);
        var s = e.gridModel;
        var l = this._coordsList;
        if (r) {
            n = r.coordinateSystem;
            if (h(l, n) < 0) {
                n = null;
            }
        } else if (a && o) n = this.getCartesian(a.componentIndex, o.componentIndex);
        else if (a) i = this.getAxis('x', a.componentIndex);
        else if (o) i = this.getAxis('y', o.componentIndex);
        else if (s) {
            var u = s.coordinateSystem;
            if (u === this) {
                n = this._coordsList[0];
            }
        }
        return {
            cartesian: n,
            axis: i
        };
    };
    Em.containPoint = function (t) {
        var e = this._coordsList[0];
        return e ? e.containPoint(t) : void 0;
    };
    Em._initCartesian = function (t, e) {
        function n(n) {
            return function (o, s) {
                if (Yh(o, t, e)) {
                    var l = o.get('position');
                    'x' === n
                        ? 'top' !== l && 'bottom' !== l && ((l = 'bottom'), i[l] && (l = 'top' === l ? 'bottom' : 'top'))
                        : 'left' !== l && 'right' !== l && ((l = 'left'), i[l] && (l = 'left' === l ? 'right' : 'left'));
                    i[l] = true;
                    var h = new Tm(n, wh(o), [0, 0], o.get('type'), l);
                    var u = 'category' === h.type;
                    h.onBand = u && o.get('boundaryGap');
                    h.inverse = o.get('inverse');
                    o.axis = h;
                    h.model = o;
                    h.grid = this;
                    h.index = s;
                    this._axesList.push(h);
                    r[n][s] = h;
                    a[n]++;
                }
            };
        }
        var i = {
            left: false,
            right: false,
            top: false,
            bottom: false
        };
        var r = {
            x: {},
            y: {}
        };
        var a = {
            x: 0,
            y: 0
        };
        e.eachComponent('xAxis', n('x'), this);
        e.eachComponent('yAxis', n('y'), this);
        return a.x && a.y
            ? ((this._axesMap = r),
              void d(
                  r.x,
                  function (e, n) {
                      d(
                          r.y,
                          function (i, r) {
                              var a = 'x' + n + 'y' + r;
                              var o = new Dh(a);
                              o.grid = this;
                              o.model = t;
                              this._coordsMap[a] = o;
                              this._coordsList.push(o);
                              o.addAxis(e);
                              o.addAxis(i);
                          },
                          this
                      );
                  },
                  this
              ))
            : ((this._axesMap = {}), void (this._axesList = []));
    };
    Em._updateScale = function (t, e) {
        function n(t, e) {
            d(t.mapDimension(e.dim, true), function (n) {
                e.scale.unionExtentFromData(t, _l(t, n));
            });
        }
        d(this._axesList, function (t) {
            t.scale.setExtent(1 / 0, -1 / 0);
        });
        t.eachSeries(function (i) {
            if (Jh(i)) {
                var r = Qh(i, t);
                var a = r[0];
                var o = r[1];
                if (!Yh(a, e, t) || !Yh(o, e, t)) {
                    return;
                }
                var s = this.getCartesian(a.componentIndex, o.componentIndex);
                var l = i.getData();
                var h = s.getAxis('x');
                var u = s.getAxis('y');
                if ('list' === l.type) {
                    n(l, h, i);
                    n(l, u, i);
                }
            }
        }, this);
    };
    Em.getTooltipAxes = function (t) {
        var e = [];
        var n = [];
        d(this.getCartesians(), function (i) {
            var r = null != t && 'auto' !== t ? i.getAxis(t) : i.getBaseAxis();
            var a = i.getOtherAxis(r);
            if (h(e, r) < 0) {
                e.push(r);
            }
            if (h(n, a) < 0) {
                n.push(a);
            }
        });
        return {
            baseAxes: e,
            otherAxes: n
        };
    };
    var Rm = ['xAxis', 'yAxis'];
    jh.create = function (t, e) {
        var n = [];
        t.eachComponent('grid', function (i, r) {
            var a = new jh(i, t, e);
            a.name = 'grid_' + r;
            a.resize(i, e, true);
            i.coordinateSystem = a;
            n.push(a);
        });
        t.eachSeries(function (e) {
            if (Jh(e)) {
                var n = Qh(e, t);
                var i = n[0];
                var r = n[1];
                var a = i.getCoordSysModel();
                var o = a.coordinateSystem;
                e.coordinateSystem = o.getCartesian(i.componentIndex, r.componentIndex);
            }
        });
        return n;
    };
    jh.dimensions = jh.prototype.dimensions = Dh.prototype.dimensions;
    Ka.register('cartesian2d', jh);
    var Bm = Math.PI;
    var zm = function (t, e) {
        this.opt = e;
        this.axisModel = t;
        s(e, {
            labelOffset: 0,
            nameDirection: 1,
            tickDirection: 1,
            labelDirection: 1,
            silent: true
        });
        this.group = new mc();
        var n = new mc({
            position: e.position.slice(),
            rotation: e.rotation
        });
        n.updateTransform();
        this._transform = n.transform;
        this._dumbGroup = n;
    };
    zm.prototype = {
        constructor: zm,
        hasBuilder: function (t) {
            return !!Nm[t];
        },
        add: function (t) {
            Nm[t].call(this);
        },
        getGroup: function () {
            return this.group;
        }
    };
    var Nm = {
        axisLine: function () {
            var t = this.opt;
            var e = this.axisModel;
            if (e.get('axisLine.show')) {
                var n = this.axisModel.axis.getExtent();
                var i = this._transform;
                var r = [n[0], 0];
                var a = [n[1], 0];
                if (i) {
                    K(r, r, i);
                    K(a, a, i);
                }
                var s = o(
                    {
                        lineCap: 'round'
                    },
                    e.getModel('axisLine.lineStyle').getLineStyle()
                );
                this.group.add(
                    new Ed(
                        Mr({
                            anid: 'line',
                            shape: {
                                x1: r[0],
                                y1: r[1],
                                x2: a[0],
                                y2: a[1]
                            },
                            style: s,
                            strokeContainThreshold: t.strokeContainThreshold || 5,
                            silent: true,
                            z2: 1
                        })
                    )
                );
                var l = e.get('axisLine.symbol');
                var h = e.get('axisLine.symbolSize');
                var u = e.get('axisLine.symbolOffset') || 0;
                if ('number' == typeof u) {
                    u = [u, u];
                }
                if (null != l) {
                    if ('string' == typeof l) {
                        l = [l, l];
                    }
                    if ('string' == typeof h || 'number' == typeof h) {
                        h = [h, h];
                    }
                    var c = h[0];
                    var f = h[1];
                    d(
                        [
                            {
                                rotate: t.rotation + Math.PI / 2,
                                offset: u[0],
                                r: 0
                            },
                            {
                                rotate: t.rotation - Math.PI / 2,
                                offset: u[1],
                                r: Math.sqrt((r[0] - a[0]) * (r[0] - a[0]) + (r[1] - a[1]) * (r[1] - a[1]))
                            }
                        ],
                        function (e, n) {
                            if ('none' !== l[n] && null != l[n]) {
                                var i = Sl(l[n], -c / 2, -f / 2, c, f, s.stroke, true);
                                var a = e.r + e.offset;
                                var o = [r[0] + a * Math.cos(t.rotation), r[1] - a * Math.sin(t.rotation)];
                                i.attr({
                                    rotation: e.rotate,
                                    position: o,
                                    silent: true
                                });
                                this.group.add(i);
                            }
                        },
                        this
                    );
                }
            }
        },
        axisTickLabel: function () {
            var t = this.axisModel;
            var e = this.opt;
            var n = su(this, t, e);
            var i = lu(this, t, e);
            iu(t, i, n);
        },
        axisName: function () {
            var t = this.opt;
            var e = this.axisModel;
            var n = k(t.axisName, e.get('name'));
            if (n) {
                var i;
                var r = e.get('nameLocation');
                var a = t.nameDirection;
                var s = e.getModel('nameTextStyle');
                var l = e.get('nameGap') || 0;
                var h = this.axisModel.axis.getExtent();
                var u = h[0] > h[1] ? -1 : 1;
                var c = ['start' === r ? h[0] - u * l : 'end' === r ? h[1] + u * l : (h[0] + h[1]) / 2, ou(r) ? t.labelOffset + a * l : 0];
                var f = e.get('nameRotate');
                if (null != f) {
                    f = (f * Bm) / 180;
                }
                var d;
                ou(r)
                    ? (i = Fm(t.rotation, null != f ? f : t.rotation, a))
                    : ((i = eu(t, r, f || 0, h)), (d = t.axisNameAvailableWidth), null != d && ((d = Math.abs(d / Math.sin(i.rotation))), !isFinite(d) && (d = null)));
                var p = s.getFont();
                var g = e.get('nameTruncate', true) || {};
                var v = g.ellipsis;
                var m = k(t.nameTruncateMaxWidth, g.maxWidth, d);
                var y =
                    null != v && null != m
                        ? ip(n, m, p, v, {
                              minChar: 2,
                              placeholder: g.placeholder
                          })
                        : n;
                var _ = e.get('tooltip', true);
                var x = e.mainType;
                var w = {
                    componentType: x,
                    name: n,
                    $vars: ['name']
                };
                w[x + 'Index'] = e.componentIndex;
                var b = new Td({
                    anid: 'name',
                    __fullText: n,
                    __truncatedText: y,
                    position: c,
                    rotation: i.rotation,
                    silent: nu(e),
                    z2: 1,
                    tooltip:
                        _ && _.show
                            ? o(
                                  {
                                      content: n,
                                      formatter: function () {
                                          return n;
                                      },
                                      formatterParams: w
                                  },
                                  _
                              )
                            : null
                });
                Fr(b.style, s, {
                    text: y,
                    textFont: p,
                    textFill: s.getTextColor() || e.get('axisLine.lineStyle.color'),
                    textAlign: i.textAlign,
                    textVerticalAlign: i.textVerticalAlign
                });
                if (e.get('triggerEvent')) {
                    b.eventData = tu(e);
                    b.eventData.targetType = 'axisName';
                    b.eventData.name = n;
                }
                this._dumbGroup.add(b);
                b.updateTransform();
                this.group.add(b);
                b.decomposeTransform();
            }
        }
    };
    var Fm = (zm.innerTextLayout = function (t, e, n) {
        var i;
        var r;
        var a = ha(e - t);
        ua(a)
            ? ((r = n > 0 ? 'top' : 'bottom'), (i = 'center'))
            : ua(a - Bm)
            ? ((r = n > 0 ? 'bottom' : 'top'), (i = 'center'))
            : ((r = 'middle'), (i = a > 0 && Bm > a ? (n > 0 ? 'right' : 'left') : n > 0 ? 'left' : 'right'));
        return {
            rotation: a,
            textAlign: i,
            textVerticalAlign: r
        };
    });
    var Vm = qs({
        type: 'axis',
        _axisPointer: null,
        axisPointerClass: null,
        render: function (t, e, n, i) {
            if (this.axisPointerClass) {
                hu(t);
            }
            Vm.superApply(this, 'render', arguments);
            pu(this, t, e, n, i, true);
        },
        updateAxisPointer: function (t, e, n, i) {
            pu(this, t, e, n, i, false);
        },
        remove: function (t, e) {
            var n = this._axisPointer;
            if (n) {
                n.remove(e);
            }
            Vm.superApply(this, 'remove', arguments);
        },
        dispose: function (t, e) {
            gu(this, e);
            Vm.superApply(this, 'dispose', arguments);
        }
    });
    var Wm = [];
    Vm.registerAxisPointerClass = function (t, e) {
        Wm[t] = e;
    };
    Vm.getAxisPointerClass = function (t) {
        return t && Wm[t];
    };
    var Hm = ['axisLine', 'axisTickLabel', 'axisName'];
    var Gm = ['splitArea', 'splitLine'];
    var qm = Vm.extend({
        type: 'cartesianAxis',
        axisPointerClass: 'CartesianAxisPointer',
        render: function (t, e, n, i) {
            this.group.removeAll();
            var r = this._axisGroup;
            this._axisGroup = new mc();
            this.group.add(this._axisGroup);
            if (t.get('show')) {
                var a = t.getCoordSysModel();
                var o = vu(a, t);
                var s = new zm(t, o);
                d(Hm, s.add, s);
                this._axisGroup.add(s.getGroup());
                d(
                    Gm,
                    function (e) {
                        if (t.get(e + '.show')) {
                            this['_' + e](t, a);
                        }
                    },
                    this
                );
                $r(r, this._axisGroup, t);
                qm.superCall(this, 'render', t, e, n, i);
            }
        },
        remove: function () {
            this._splitAreaColors = null;
        },
        _splitLine: function (t, e) {
            var n = t.axis;
            if (!n.scale.isBlank()) {
                var i = t.getModel('splitLine');
                var r = i.getModel('lineStyle');
                var a = r.get('color');
                a = _(a) ? a : [a];
                for (
                    o = e.coordinateSystem.getRect(),
                        l = n.isHorizontal(),
                        h = 0,
                        u = n.getTicksCoords({
                            tickModel: i
                        }),
                        c = [],
                        f = [],
                        d = r.getLineStyle(),
                        p = 0,
                        void 0;
                    p < u.length;
                    p++
                ) {
                    var o;
                    var l;
                    var h;
                    var u;
                    var c;
                    var f;
                    var d;
                    var p;
                    var g = n.toGlobalCoord(u[p].coord);
                    l ? ((c[0] = g), (c[1] = o.y), (f[0] = g), (f[1] = o.y + o.height)) : ((c[0] = o.x), (c[1] = g), (f[0] = o.x + o.width), (f[1] = g));
                    var v = h++ % a.length;
                    var m = u[p].tickValue;
                    this._axisGroup.add(
                        new Ed(
                            Mr({
                                anid: null != m ? 'line_' + u[p].tickValue : null,
                                shape: {
                                    x1: c[0],
                                    y1: c[1],
                                    x2: f[0],
                                    y2: f[1]
                                },
                                style: s(
                                    {
                                        stroke: a[v]
                                    },
                                    d
                                ),
                                silent: true
                            })
                        )
                    );
                }
            }
        },
        _splitArea: function (t, e) {
            var n = t.axis;
            if (!n.scale.isBlank()) {
                var i = t.getModel('splitArea');
                var r = i.getModel('areaStyle');
                var a = r.get('color');
                var o = e.coordinateSystem.getRect();
                var l = n.getTicksCoords({
                    tickModel: i,
                    clamp: true
                });
                if (l.length) {
                    var h = a.length;
                    var u = this._splitAreaColors;
                    var c = z();
                    var f = 0;
                    if (u) {
                        for (var d = 0; d < l.length; d++) {
                            var p = u.get(l[d].tickValue);
                            if (null != p) {
                                f = (p + (h - 1) * d) % h;
                                break;
                            }
                        }
                    }
                    var g = n.toGlobalCoord(l[0].coord);
                    var v = r.getAreaStyle();
                    a = _(a) ? a : [a];
                    for (var d = 1; d < l.length; d++) {
                        var m;
                        var y;
                        var x;
                        var w;
                        var b = n.toGlobalCoord(l[d].coord);
                        n.isHorizontal() ? ((m = g), (y = o.y), (x = b - m), (w = o.height), (g = m + x)) : ((m = o.x), (y = g), (x = o.width), (w = b - y), (g = y + w));
                        var M = l[d - 1].tickValue;
                        if (null != M) {
                            c.set(M, f);
                        }
                        this._axisGroup.add(
                            new Od({
                                anid: null != M ? 'area_' + M : null,
                                shape: {
                                    x: m,
                                    y: y,
                                    width: x,
                                    height: w
                                },
                                style: s(
                                    {
                                        fill: a[f]
                                    },
                                    v
                                ),
                                silent: true
                            })
                        );
                        f = (f + 1) % h;
                    }
                    this._splitAreaColors = c;
                }
            }
        }
    });
    qm.extend({
        type: 'xAxis'
    });
    qm.extend({
        type: 'yAxis'
    });
    qs({
        type: 'grid',
        render: function (t) {
            this.group.removeAll();
            if (t.get('show')) {
                this.group.add(
                    new Od({
                        shape: t.coordinateSystem.getRect(),
                        style: s(
                            {
                                fill: t.get('backgroundColor')
                            },
                            t.getItemStyle()
                        ),
                        silent: true,
                        z2: -1
                    })
                );
            }
        }
    });
    Os(function (t) {
        if (t.xAxis && t.yAxis && !t.grid) {
            t.grid = {};
        }
    });
    Vs(Gv('line', 'circle', 'line'));
    Fs(qv('line'));
    Es(Bg.PROCESSOR.STATISTIC, Yv('line'));
    {
        var Xm = function (t, e, n) {
            e =
                (_(e) && {
                    coordDimensions: e
                }) ||
                o({}, e);
            var i = t.getSource();
            var r = mv(i, e);
            var a = new pv(r, t);
            a.initData(i, n);
            return a;
        };
        var Um =
            ($p.extend({
                type: 'series.gauge',
                getInitialData: function (t) {
                    var e = t.data || [];
                    _(e) || (e = [e]);
                    t.data = e;
                    return Xm(this, ['value']);
                },
                defaultOption: {
                    zlevel: 0,
                    z: 2,
                    center: ['50%', '50%'],
                    legendHoverLink: true,
                    radius: '75%',
                    startAngle: 225,
                    endAngle: -45,
                    clockwise: true,
                    min: 0,
                    max: 100,
                    splitNumber: 10,
                    axisLine: {
                        show: true,
                        lineStyle: {
                            color: [
                                [0.2, '#91c7ae'],
                                [0.8, '#63869e'],
                                [1, '#c23531']
                            ],
                            width: 30
                        }
                    },
                    splitLine: {
                        show: true,
                        length: 30,
                        lineStyle: {
                            color: '#eee',
                            width: 2,
                            type: 'solid'
                        }
                    },
                    axisTick: {
                        show: true,
                        splitNumber: 5,
                        length: 8,
                        lineStyle: {
                            color: '#eee',
                            width: 1,
                            type: 'solid'
                        }
                    },
                    axisLabel: {
                        show: true,
                        distance: 5,
                        color: 'auto'
                    },
                    pointer: {
                        show: true,
                        length: '80%',
                        width: 8
                    },
                    itemStyle: {
                        color: 'auto'
                    },
                    title: {
                        show: true,
                        offsetCenter: [0, '-40%'],
                        color: '#333',
                        fontSize: 15
                    },
                    detail: {
                        show: true,
                        backgroundColor: 'rgba(0,0,0,0)',
                        borderWidth: 0,
                        borderColor: '#ccc',
                        width: 100,
                        height: null,
                        padding: [5, 10],
                        offsetCenter: [0, '40%'],
                        color: 'auto',
                        fontSize: 30
                    }
                }
            }),
            hr.extend({
                type: 'echartsGaugePointer',
                shape: {
                    angle: 0,
                    width: 10,
                    r: 10,
                    x: 0,
                    y: 0
                },
                buildPath: function (t, e) {
                    var n = Math.cos;
                    var i = Math.sin;
                    var r = e.r;
                    var a = e.width;
                    var o = e.angle;
                    var s = e.x - n(o) * a * (a >= r / 3 ? 1 : 2);
                    var l = e.y - i(o) * a * (a >= r / 3 ? 1 : 2);
                    o = e.angle - Math.PI / 2;
                    t.moveTo(s, l);
                    t.lineTo(e.x + n(o) * a, e.y + i(o) * a);
                    t.lineTo(e.x + n(e.angle) * r, e.y + i(e.angle) * r);
                    t.lineTo(e.x - n(o) * a, e.y - i(o) * a);
                    t.lineTo(s, l);
                }
            }));
        var Ym = 2 * Math.PI;
        zo.extend({
            type: 'gauge',
            render: function (t, e, n) {
                this.group.removeAll();
                var i = t.get('axisLine.lineStyle.color');
                var r = mu(t, n);
                this._renderMain(t, e, n, i, r);
            },
            dispose: function () {},
            _renderMain: function (t, e, n, i, r) {
                for (
                    a = this.group,
                        o = t.getModel('axisLine'),
                        s = o.getModel('lineStyle'),
                        l = t.get('clockwise'),
                        h = (-t.get('startAngle') / 180) * Math.PI,
                        u = (-t.get('endAngle') / 180) * Math.PI,
                        c = (u - h) % Ym,
                        f = h,
                        d = s.get('width'),
                        p = 0,
                        void 0;
                    p < i.length;
                    p++
                ) {
                    var a;
                    var o;
                    var s;
                    var l;
                    var h;
                    var u;
                    var c;
                    var f;
                    var d;
                    var p;
                    var g = Math.min(Math.max(i[p][0], 0), 1);
                    var u = h + c * g;
                    var v = new Ad({
                        shape: {
                            startAngle: f,
                            endAngle: u,
                            cx: r.cx,
                            cy: r.cy,
                            clockwise: l,
                            r0: r.r - d,
                            r: r.r
                        },
                        silent: true
                    });
                    v.setStyle({
                        fill: i[p][1]
                    });
                    v.setStyle(s.getLineStyle(['color', 'borderWidth', 'borderColor']));
                    a.add(v);
                    f = u;
                }
                var m = function (t) {
                    if (0 >= t) {
                        return i[0][1];
                    }
                    for (var e = 0; e < i.length; e++) {
                        if (i[e][0] >= t && (0 === e ? 0 : i[e - 1][0]) < t) {
                            return i[e][1];
                        }
                    }
                    return i[e - 1][1];
                };
                if (!l) {
                    var y = h;
                    h = u;
                    u = y;
                }
                this._renderTicks(t, e, n, m, r, h, u, l);
                this._renderPointer(t, e, n, m, r, h, u, l);
                this._renderTitle(t, e, n, m, r);
                this._renderDetail(t, e, n, m, r);
            },
            _renderTicks: function (t, e, n, i, r, a, o) {
                for (
                    s = this.group,
                        l = r.cx,
                        h = r.cy,
                        u = r.r,
                        c = +t.get('min'),
                        f = +t.get('max'),
                        d = t.getModel('splitLine'),
                        p = t.getModel('axisTick'),
                        g = t.getModel('axisLabel'),
                        v = t.get('splitNumber'),
                        m = p.get('splitNumber'),
                        y = aa(d.get('length'), u),
                        _ = aa(p.get('length'), u),
                        x = a,
                        w = (o - a) / v,
                        b = w / m,
                        M = d.getModel('lineStyle').getLineStyle(),
                        S = p.getModel('lineStyle').getLineStyle(),
                        C = 0,
                        void 0;
                    v >= C;
                    C++
                ) {
                    var s;
                    var l;
                    var h;
                    var u;
                    var c;
                    var f;
                    var d;
                    var p;
                    var g;
                    var v;
                    var m;
                    var y;
                    var _;
                    var x;
                    var w;
                    var b;
                    var M;
                    var S;
                    var C;
                    var T = Math.cos(x);
                    var k = Math.sin(x);
                    if (d.get('show')) {
                        var D = new Ed({
                            shape: {
                                x1: T * u + l,
                                y1: k * u + h,
                                x2: T * (u - y) + l,
                                y2: k * (u - y) + h
                            },
                            style: M,
                            silent: true
                        });
                        if ('auto' === M.stroke) {
                            D.setStyle({
                                stroke: i(C / v)
                            });
                        }
                        s.add(D);
                    }
                    if (g.get('show')) {
                        var I = yu(oa((C / v) * (f - c) + c), g.get('formatter'));
                        var A = g.get('distance');
                        var L = i(C / v);
                        s.add(
                            new Td({
                                style: Fr(
                                    {},
                                    g,
                                    {
                                        text: I,
                                        x: T * (u - y - A) + l,
                                        y: k * (u - y - A) + h,
                                        textVerticalAlign: -0.4 > k ? 'top' : k > 0.4 ? 'bottom' : 'middle',
                                        textAlign: -0.4 > T ? 'left' : T > 0.4 ? 'right' : 'center'
                                    },
                                    {
                                        autoColor: L
                                    }
                                ),
                                silent: true
                            })
                        );
                    }
                    if (p.get('show') && C !== v) {
                        for (var P = 0; m >= P; P++) {
                            var T = Math.cos(x);
                            var k = Math.sin(x);
                            var O = new Ed({
                                shape: {
                                    x1: T * u + l,
                                    y1: k * u + h,
                                    x2: T * (u - _) + l,
                                    y2: k * (u - _) + h
                                },
                                silent: true,
                                style: S
                            });
                            if ('auto' === S.stroke) {
                                O.setStyle({
                                    stroke: i((C + P / m) / v)
                                });
                            }
                            s.add(O);
                            x += b;
                        }
                        x -= b;
                    } else {
                        x += w;
                    }
                }
            },
            _renderPointer: function (t, e, n, i, r, a, o) {
                var s = this.group;
                var l = this._data;
                if (!t.get('pointer.show')) {
                    return void (
                        l &&
                        l.eachItemGraphicEl(function (t) {
                            s.remove(t);
                        })
                    );
                }
                var h = [+t.get('min'), +t.get('max')];
                var u = [a, o];
                var c = t.getData();
                var f = c.mapDimension('value');
                c.diff(l)
                    .add(function (e) {
                        var n = new Um({
                            shape: {
                                angle: a
                            }
                        });
                        Zr(
                            n,
                            {
                                shape: {
                                    angle: ra(c.get(f, e), h, u, true)
                                }
                            },
                            t
                        );
                        s.add(n);
                        c.setItemGraphicEl(e, n);
                    })
                    .update(function (e, n) {
                        var i = l.getItemGraphicEl(n);
                        jr(
                            i,
                            {
                                shape: {
                                    angle: ra(c.get(f, e), h, u, true)
                                }
                            },
                            t
                        );
                        s.add(i);
                        c.setItemGraphicEl(e, i);
                    })
                    .remove(function (t) {
                        var e = l.getItemGraphicEl(t);
                        s.remove(e);
                    })
                    .execute();
                c.eachItemGraphicEl(function (t, e) {
                    var n = c.getItemModel(e);
                    var a = n.getModel('pointer');
                    t.setShape({
                        x: r.cx,
                        y: r.cy,
                        width: aa(a.get('width'), r.r),
                        r: aa(a.get('length'), r.r)
                    });
                    t.useStyle(n.getModel('itemStyle').getItemStyle());
                    if ('auto' === t.style.fill) {
                        t.setStyle('fill', i(ra(c.get(f, e), h, [0, 1], true)));
                    }
                    zr(t, n.getModel('emphasis.itemStyle').getItemStyle());
                });
                this._data = c;
            },
            _renderTitle: function (t, e, n, i, r) {
                var a = t.getData();
                var o = a.mapDimension('value');
                var s = t.getModel('title');
                if (s.get('show')) {
                    var l = s.get('offsetCenter');
                    var h = r.cx + aa(l[0], r.r);
                    var u = r.cy + aa(l[1], r.r);
                    var c = +t.get('min');
                    var f = +t.get('max');
                    var d = t.getData().get(o, 0);
                    var p = i(ra(d, [c, f], [0, 1], true));
                    this.group.add(
                        new Td({
                            silent: true,
                            style: Fr(
                                {},
                                s,
                                {
                                    x: h,
                                    y: u,
                                    text: a.getName(0),
                                    textAlign: 'center',
                                    textVerticalAlign: 'middle'
                                },
                                {
                                    autoColor: p,
                                    forceRich: true
                                }
                            )
                        })
                    );
                }
            },
            _renderDetail: function (t, e, n, i, r) {
                var a = t.getModel('detail');
                var o = +t.get('min');
                var s = +t.get('max');
                if (a.get('show')) {
                    var l = a.get('offsetCenter');
                    var h = r.cx + aa(l[0], r.r);
                    var u = r.cy + aa(l[1], r.r);
                    var c = aa(a.get('width'), r.r);
                    var f = aa(a.get('height'), r.r);
                    var d = t.getData();
                    var p = d.get(d.mapDimension('value'), 0);
                    var g = i(ra(p, [o, s], [0, 1], true));
                    this.group.add(
                        new Td({
                            silent: true,
                            style: Fr(
                                {},
                                a,
                                {
                                    x: h,
                                    y: u,
                                    text: yu(p, a.get('formatter')),
                                    textWidth: isNaN(c) ? null : c,
                                    textHeight: isNaN(f) ? null : f,
                                    textAlign: 'center',
                                    textVerticalAlign: 'middle'
                                },
                                {
                                    autoColor: g,
                                    forceRich: true
                                }
                            )
                        })
                    );
                }
            }
        });
    }
    t.version = Tg;
    t.dependencies = kg;
    t.PRIORITY = Bg;
    t.init = Ts;
    t.connect = ks;
    t.disConnect = Ds;
    t.disconnect = iv;
    t.dispose = Is;
    t.getInstanceByDom = As;
    t.getInstanceById = Ls;
    t.registerTheme = Ps;
    t.registerPreprocessor = Os;
    t.registerProcessor = Es;
    t.registerPostUpdate = Rs;
    t.registerAction = Bs;
    t.registerCoordinateSystem = zs;
    t.getCoordinateSystemDimensions = Ns;
    t.registerLayout = Fs;
    t.registerVisual = Vs;
    t.registerLoading = Hs;
    t.extendComponentModel = Gs;
    t.extendComponentView = qs;
    t.extendSeriesModel = Xs;
    t.extendChartView = Us;
    t.setCanvasCreator = Ys;
    t.registerMap = js;
    t.getMap = Zs;
    t.dataTool = rv;
});
